Re: Cursors in SPI functions/procedures

From: Jan Wieck <janwieck(at)Yahoo(dot)com>
To: Ian Lance Taylor <ian(at)airs(dot)com>
Cc: Camm Maguire <camm(at)enhanced(dot)com>, PGSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cursors in SPI functions/procedures
Date: 2001-02-06 10:41:02
Message-ID: 200102061041.FAA00968@jupiter.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ian Lance Taylor wrote:
> Camm Maguire <camm(at)enhanced(dot)com> writes:
>
> > Greetings! Just read that this functionality is planned for the
> > future. Can 7.1 have cursors in pgsql functions, for example?
>
> No, it can't.
>
> I have a patch which adds support for cursors in PL/pgSQL. If anybody
> is interested, I can provide that patch against either 7.0.3 or the
> current CVS sources. I have sent it to the maintainers, and they will
> consider it after the 7.1 release.

The one patch I've seen on this topic simply added some
CURSOR syntax to the PL/pgSQL parser, but did it with a
regular SPI query in the background. I object that'd be a
good idea, because it let's ppl think they're using a cursor,
test their functions against test data and assume they'll
still work if selecting a couple of million rows at once in
production. That wouldn't be true, because the backend might
run out of memory, what they wanted to avoid by using the
cursor in the first place.

So if we provide CURSOR syntax in PL's, we should provide the
real functionality as well.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message DaVinci 2001-02-06 10:44:38 Re: 7.1beta4-2 Debian packages... help!
Previous Message Oliver Elphick 2001-02-06 10:26:12 Re: 7.1beta4-2 Debian packages... help!