Re: [BUGS] BUG #1592: "with hold" cursor problem

2005-04-11 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > One further question is if it's right for the holdable portal to fire > trigger at transaction commit. ISTM the non-surprising answer would be > for them to fire at FETCH time. (But of course this is hard to > implement, since at that time we don't hav

Re: [BUGS] BUG #1592: "with hold" cursor problem

2005-04-11 Thread Alvaro Herrera
On Mon, Apr 11, 2005 at 11:49:22AM -0400, Tom Lane wrote: > The problem here is that CommitTransaction shuts down the trigger > manager before shutting down portals, so of course trigger.c barfs > when the SQL function wants it to check for queued triggers. > > There seems to be a rather fundamen

Re: [BUGS] BUG #1592: "with hold" cursor problem

2005-04-11 Thread Tom Lane
Andrew - Supernews <[EMAIL PROTECTED]> writes: > test=# create function crashme() returns text as 'select timeofday()' > test-# language sql stable; > CREATE FUNCTION > test=# begin; > BEGIN > test=# declare t cursor with hold for select crashme() as x from pg_class; > DECLARE CURSOR > test=# com

Re: [BUGS] BUG #1592: "with hold" cursor problem

2005-04-11 Thread Andrew - Supernews
On 2005-04-10, Tom Lane <[EMAIL PROTECTED]> wrote: > "Gabor Berenyi" <[EMAIL PROTECTED]> writes: >> begin; >> declare t cursor with hold for select function() as x from R; >> commit; > >> Documentation says that the rows represented by a held cursor are copied >> into a temporary file or memory a

Re: [BUGS] BUG #1592: "with hold" cursor problem

2005-04-10 Thread Tom Lane
"Gabor Berenyi" <[EMAIL PROTECTED]> writes: > begin; > declare t cursor with hold for select function() as x from R; > commit; > Documentation says that the rows represented by a held cursor are copied > into a temporary file or memory area, but they are not, if they are results > of a function

[BUGS] BUG #1592: "with hold" cursor problem

2005-04-10 Thread Gabor Berenyi
The following bug has been logged online: Bug reference: 1592 Logged by: Gabor Berenyi Email address: [EMAIL PROTECTED] PostgreSQL version: 8.0.0 Operating system: i86 Debian Linux 2.4.20 Description:"with hold" cursor problem Details: begin; declare t cursor with