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

From Tom Lane
Subject Re: bug w/ cursors and savepoints
Date
Msg-id 5533.1106677787@sss.pgh.pa.us
Whole thread Raw
In response to Re: bug w/ cursors and savepoints  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: bug w/ cursors and savepoints  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> !         if (portal->status == PORTAL_ACTIVE)
>               portal->status = PORTAL_FAILED;

> !         if (portal->status == PORTAL_ACTIVE || portal->status == PORTAL_READY)
>               portal->status = PORTAL_FAILED;

I don't think you actually need that change, since you're going to
unconditionally close the portal below.  The case for PORTAL_ACTIVE
is just there to dodge the sanity check in PortalDrop.

The routine's comments need a bit of work too.  Otherwise it seems OK.
Neil or anyone else --- see an issue here?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: bug w/ cursors and savepoints
Next
From: "Magnus Hagander"
Date:
Subject: Re: Heads up: upcoming releases in all branches back to 7.2