Received: from smtp018.mail.yahoo.com (smtp018.mail.yahoo.com [216.136.174.115]) by postgresql.org (Postfix) with SMTP id D7F3B4759D1 for ; Thu, 14 Mar 2002 10:35:29 -0500 (EST) Received: from janwieck (AUTH login) at psc.progress.com (HELO saturn.janwieck.net) (janwieck@192.233.92.200) by smtp.mail.vip.sc5.yahoo.com with SMTP; 14 Mar 2002 15:35:33 -0000 Received: (from wieck@localhost) by saturn.janwieck.net (8.11.2/8.11.2) id g2EFLUg02750; Thu, 14 Mar 2002 10:21:30 -0500 From: Jan Wieck Message-Id: <200203141521.g2EFLUg02750@saturn.janwieck.net> Subject: Re: Large data sets and FOR LOOP's In-Reply-To: <1016092672.878.14.camel@netgroup> from Bo Lorentsen at "Mar 14, 2002 08:57:52 am" To: Bo Lorentsen Date: Thu, 14 Mar 2002 10:21:30 -0500 (EST) Cc: Jan Wieck , pgsql-sql X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200203/181 X-Sequence-Number: 7061 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@Yahoo.com # _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com