Re: Large data sets and FOR LOOP's

From: Jan Wieck <janwieck(at)yahoo(dot)com>
To: Bo Lorentsen <bl(at)netgroup(dot)dk>
Cc: Jan Wieck <janwieck(at)yahoo(dot)com>, pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Large data sets and FOR LOOP's
Date: 2002-03-14 15:21:30
Message-ID: 200203141521.g2EFLUg02750@saturn.janwieck.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Bo Lorentsen wrote:
> On Wed, 2002-03-13 at 17:29, Jan Wieck wrote:
>
> > You probably want to upgrade to 7.2, because 7.2's PL/pgSQL
> > uses the newly available SPI cursors silently in FOR loops.
> This sounds good, I like to upgrade anyway, also to take advantage of
> the new vaccum.
>
> > Releases before 7.2 loaded the entire result set into memory
> > (ahem, swap space) before entering the FOR loop.
> This was what I guested, too :-)
>
> Would a cursor have helped any ?

Sure, if they whould've been available in PL/pgSQL. This all
was a combined feature enhancement for 7.2. 1st cursor
support over SPI (an internal query interface inside the
backend), 2nd support for cursors and reference cursors in
PL/pgSQL, 3rd automatic usage of internal cursors in FOR
loops.

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-sql by date

  From Date Subject
Next Message Bo Lorentsen 2002-03-14 15:56:28 Re: Large data sets and FOR LOOP's
Previous Message Bo Lorentsen 2002-03-14 08:06:39 Re: checking for existence of a table in plpgsql.