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

From Alvaro Herrera
Subject Re: Bug in PL/pgSQL FOR cursor variant
Date
Msg-id 1277157470-sup-508@alvh.no-ip.org
Whole thread Raw
In response to Re: Bug in PL/pgSQL FOR cursor variant  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Bug in PL/pgSQL FOR cursor variant  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-bugs
Excerpts from Heikki Linnakangas's message of lun jun 21 17:47:43 -0400 2010:

> Maybe it would be easier to somehow protect the portal then, and throw
> an error if you try to close it. We could just mark the portal as
> PORTAL_ACTIVE while we run the user statements, but that would also
> forbid fetching or moving it. I'm thinking of a new "pinned" state,
> which is like PORTAL_READY except that the portal can't be dropped like
> in PORTAL_ACTIVE state.

Why is it an error to close the portal?  Maybe we should keep it closed
(i.e. don't free it), and error out only when it is accessed again.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Bug in PL/pgSQL FOR cursor variant
Next
From: Heikki Linnakangas
Date:
Subject: Re: Bug in PL/pgSQL FOR cursor variant