Re: bug w/ cursors and savepoints - Mailing list pgsql-hackers

From Tom Lane
Subject Re: bug w/ cursors and savepoints
Date
Msg-id 23440.1106783973@sss.pgh.pa.us
Whole thread Raw
In response to Re: bug w/ cursors and savepoints  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> On Wed, 2005-01-26 at 12:02 -0300, Alvaro Herrera wrote:
>> Hmm ... not sure how hard that is.

> Would it work to record the sub XID of the deleting subtxn on CLOSE, and
> then consider whether to "really" do the deletion when the subtxn
> commits/aborts?

It'd take more than that.  Consider
BEGIN;DECLARE c CURSOR ...;SAVEPOINT x;    CLOSE c;    DECLARE c CURSOR ...;    -- draws duplicate-cursor error

You'd need to do something to "hide" the deleted cursor for the
remainder of its subtransaction.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: bug w/ cursors and savepoints
Next
From: Alvaro Herrera
Date:
Subject: Re: Data statement format used by the .sh scripts