Received: from smtp013.mail.yahoo.com (smtp013.mail.yahoo.com [216.136.173.57]) by postgresql.org (8.11.3/8.11.4) with SMTP id f7F5xRP69422 for ; Wed, 15 Aug 2001 01:59:27 -0400 (EDT) (envelope-from janwieck@yahoo.com) Received: from pool-63.49.143.222.bltm.grid.net (HELO jupiter.us.greatbridge.com) (63.49.143.222) by smtp.mail.vip.sc5.yahoo.com with SMTP; 15 Aug 2001 05:59:25 -0000 X-Apparently-From: Received: (from wieck@localhost) by jupiter.us.greatbridge.com (8.11.2/8.11.2) id f7F5n3H02394; Wed, 15 Aug 2001 01:49:03 -0400 From: Jan Wieck Message-Id: <200108150549.f7F5n3H02394@jupiter.us.greatbridge.com> Subject: Re: result sets from functions... In-Reply-To: from Josh Berkus at "Aug 14, 2001 07:54:56 pm" To: Josh Berkus Date: Wed, 15 Aug 2001 01:49:03 -0400 (EDT) CC: "Robert J. Sanford, Jr." , pgsql-sql@postgresql.org 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: 200108/204 X-Sequence-Number: 4436 Josh Berkus wrote: > Robert, > > > i'm reading the postgres documentation and i'm specifically > > interested in creating stored procedures so that i can keep > > as much of the business logic in the database as possible. > > while reading 13.1.3 (SQL Functions on Composite Types) in > > the Programmer's Guide i come across the phrase... > > "When calling a function that returns a row, we cannot > > retrieve the entire row. We must either project an > > attribute out of the row or pass the entire row into > > another function. > > SELECT name(new_emp()) AS nobody;" > > Unfortunately, PostgreSQL functions do not yet return result sets. This > is on the "todo" list but unfortunately requires an overhaul of how > postgresql functions work. As said, in v7.2 we'll have the ability to return cursors from functions (and I'm looking actually into the ability of doing RETURN AND RESUME). So there is at least some sort of workaround on the horizon. 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