Re: Bug in PL/pgSQL FOR cursor variant

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Bug in PL/pgSQL FOR cursor variant
Date: 2010-06-21 18:42:58
Message-ID: 4C1FB2B2.3000904@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2010-06-21 18:44:57 Re: BUG #5519: uuid-ossp files missing from contrib rpm
Previous Message Kelly McLaughlin 2010-06-21 17:38:07 BUG #5519: uuid-ossp files missing from contrib rpm