"Jeroen T. Vermeulen" <[EMAIL PROTECTED]> writes:
> Looking at my problem with changed cursor behaviour in 7.3 again, I
> noticed something interesting: a cursor in 7.3 apparently does not let 
> you scroll back to its first row at all!

Oh?

regression=# begin;
BEGIN
regression=# declare c cursor for select * from int8_tbl;
DECLARE CURSOR
regression=# fetch all from c;
        q1        |        q2
------------------+-------------------
              123 |               456
              123 |  4567890123456789
 4567890123456789 |               123
 4567890123456789 |  4567890123456789
 4567890123456789 | -4567890123456789
(5 rows)

regression=# move backward all in c;
MOVE 5
regression=# fetch all from c;
        q1        |        q2
------------------+-------------------
              123 |               456
              123 |  4567890123456789
 4567890123456789 |               123
 4567890123456789 |  4567890123456789
 4567890123456789 | -4567890123456789
(5 rows)

regression=#


I believe it is true though that backing up a cursor only works for
certain plan types (seqscan, indexscan, sort, maybe a couple others).
That has always been true --- 7.3 is no better nor worse than prior
releases.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to