Re: 7.3: Change in cursor behaviour? - Mailing list pgsql-hackers
From | Rod Taylor |
---|---|
Subject | Re: 7.3: Change in cursor behaviour? |
Date | |
Msg-id | 1038857343.46704.47.camel@jester Whole thread Raw |
In response to | 7.3: Change in cursor behaviour? ("Jeroen T. Vermeulen" <jtv@xs4all.nl>) |
Responses |
Re: 7.3: Change in cursor behaviour?
|
List | pgsql-hackers |
On Mon, 2002-12-02 at 10:20, Jeroen T. Vermeulen wrote: > The scenario boils down to: Create a cursor, fetch n rows, move minus 2 > billion or so rows, fetch 1 row. That last fetch used to give me the > row I was hoping for (the original first row again), but with 7.3 it > appears to yield nothing. Seems to work the fine for me: rbt=# select version(); version ------------------------------------------------------------------------PostgreSQL 7.4devel on i386-unknown-freebsd4.7, compiledby GCC 2.95.4 (1 row) rbt=# begin; BEGIN rbt=# declare c cursor for select * from pg_attribute; DECLARE CURSOR rbt=# fetch 5 from c;attrelid | attname | atttypid | attstattarget | attlen | attnum | attndims | attcacheoff | atttypmod | attbyval | attstorage | attisset | attalign | attnotnull | atthasdef | attisdropped | attislocal | attinhcount ----------+--------------+----------+---------------+--------+--------+----------+-------------+-----------+----------+------------+----------+----------+------------+-----------+--------------+------------+------------- 1247 | typname | 19 | -1 | 64 | 1 | 0 | -1 | -1 | f | p | f | i | t | f | f | t | 0 1247 | typnamespace | 26 | -1 | 4 | 2 | 0 | -1 | -1 | t | p | f | i | t | f | f | t | 0 1247 | typowner | 23 | 0 | 4 | 3 | 0 | -1 | -1 | t | p | f | i | t | f | f | t | 0 1247 | typlen | 21 | 0 | 2 | 4 | 0 | -1 | -1 | t | p | f | s | t | f | f | t | 0 1247 | typbyval | 16 | 0 | 1 | 5 | 0 | -1 | -1 | t | p | f | c | t | f | f | t | 0 (5 rows) rbt=# move -15 in c; MOVE 4 rbt=# fetch 1 from c;attrelid | attname | atttypid | attstattarget | attlen | attnum | attndims | attcacheoff | atttypmod | attbyval | attstorage | attisset | attalign | attnotnull | atthasdef | attisdropped | attislocal | attinhcount ----------+---------+----------+---------------+--------+--------+----------+-------------+-----------+----------+------------+----------+----------+------------+-----------+--------------+------------+------------- 1247 | typname | 19 | -1 | 64 | 1 | 0 | -1 | -1 | f | p | f | i | t | f | f | t | 0 (1 row) -- Rod Taylor <rbt@rbt.ca> PGP Key: http://www.rbt.ca/rbtpub.asc
pgsql-hackers by date: