Re: [GENERAL] Fun with Cursors- how to rewind a cursor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Postgres User <postgres(dot)developer(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] Fun with Cursors- how to rewind a cursor
Date: 2007-03-25 23:08:04
Message-ID: 25786.1174864084@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

I wrote:
> I'd venture that we should try to get rid of the restriction, but I'm
> unsure whether removing the error check is sufficient or whether there
> are real problems it's preventing.

I did a little experimentation and it seems that DECLARE CURSOR,
FETCH, and CLOSE work perfectly fine when executed through SPI
(after diking out the error check). So I see no reason to have
that prohibition in place --- we may as well just take it out and
save a few lines of code.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthijs Melissen 2007-03-26 00:00:27 Strange result using transactions
Previous Message Dmitry Koterov 2007-03-25 22:44:34 Re: Check the existance of temporary table

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-03-26 00:44:30 Re: tsearch2 regression test failures
Previous Message Tom Lane 2007-03-25 20:07:18 Re: Idea for cleaner representation of snapshots