Skip site navigation (1) Skip section navigation (2)

Re: Bug in PL/pgSQL FOR cursor variant

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Bug in PL/pgSQL FOR cursor variant
Date: 2010-06-21 22:29:48
Message-ID: 4C1FE7DC.1020809@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On 22/06/10 00:59, Alvaro Herrera wrote:
> 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?

What useful behavior ẃould you expect from closing it?

>  Maybe we should keep it closed
> (i.e. don't free it), and error out only when it is accessed again.

I guess we could do that too, but it really doesn't make much sense to 
close it in the first place.

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

In response to

Responses

pgsql-bugs by date

Next:From: Heikki LinnakangasDate: 2010-06-21 22:49:57
Subject: Re: Bug in PL/pgSQL FOR cursor variant
Previous:From: Alvaro HerreraDate: 2010-06-21 21:59:25
Subject: Re: Bug in PL/pgSQL FOR cursor variant

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group