Bug in cursors??

From: Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au>
To: "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Bug in cursors??
Date: 2000-02-08 05:56:06
Message-ID: 389FAFF6.44B7F6ED@nimrod.itg.telecom.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi all,

I came across this comment in exec_append_initialize_next....

/* ----------------
* initialize the scan
* (and update the range table appropriately)
* (doesn't this leave the range table hosed for anybody upstream
* of the Append node??? - jolly )
* ----------------
*/

I took a stab at guessing what this might mean, and ran the following
test.
It looks like a bug. Can anybody shed any light on whether the above
comment is likely to relate to this bug, and is there anybody who is
so intimate with this code that they are willing to fix it?

# Comment: b and c inherit from a. d inherits from b.
chrisb=# begin work;
BEGIN
chrisb=# select aa from a;
aa
----
(0 rows)

chrisb=# select aa from b;
aa
-----
ppp
(1 row)

chrisb=# select aa from c;
aa
-------
cmore
(1 row)

chrisb=# select aa from d;
aa
-------
dmore
(1 row)

chrisb=# select aa from a*;
aa
-------
ppp
cmore
dmore
(3 rows)

chrisb=# declare cu cursor for select aa from a*;
SELECT
chrisb=# fetch forward 1 in cu;
aa
-----
ppp
(1 row)

chrisb=# fetch forward 1 in cu;
aa
-------
cmore
(1 row)

chrisb=# fetch backward 1 in cu;
aa
----
(0 rows)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2000-02-08 05:58:57 Questions on 7.0 for RPM building
Previous Message Don Baccus 2000-02-08 05:03:51 Re: [HACKERS] TODO item