Re: Bug in PL/pgSQL FOR cursor variant - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: Bug in PL/pgSQL FOR cursor variant
Date
Msg-id 4C1FB2B2.3000904@enterprisedb.com
Whole thread Raw
In response to Re: Bug in PL/pgSQL FOR cursor variant  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug in PL/pgSQL FOR cursor variant  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 21/06/10 17:08, Tom Lane wrote:
> I suspect you need to pstrdup() the portalname.

Yes, you're right. Thanks.

> Also, isn't exec_for_query() at just as much risk?
> The latter's problem would only be exposed if the cursor was closed
> at a batch boundary, but it's still a problem.

Can you elaborate? I thought I fixed exec_for_query(). (except for the
missing pstrdup).

> I wonder whether we ought to try to make it an error to close a portal
> that's still in use.

I think it's fine as it is. FWIW what we do now matches Oracle.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: "Kelly McLaughlin"
Date:
Subject: BUG #5519: uuid-ossp files missing from contrib rpm
Next
From: Devrim GÜNDÜZ
Date:
Subject: Re: BUG #5519: uuid-ossp files missing from contrib rpm