X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 16F7A924EEB for ; Tue, 20 May 2003 21:40:47 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 24261-03 for ; Tue, 20 May 2003 21:40:15 -0400 (EDT) Received: from flamingo.mail.pas.earthlink.net (flamingo.mail.pas.earthlink.net [207.217.120.232]) by developer.postgresql.org (Postfix) with ESMTP id 056EB924E7D for ; Tue, 20 May 2003 21:40:15 -0400 (EDT) Received: from user-38ld87p.dialup.mindspring.com ([209.86.160.249]) by flamingo.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 19IIaS-0004gR-00; Tue, 20 May 2003 18:40:13 -0700 From: ritchie turner To: Benjamin Stewart , pgsql-sql@postgresql.org Subject: Re: Functions that return Record Sets Date: Tue, 20 May 2003 21:39:43 -0700 User-Agent: KMail/1.5.1 References: <3ECB5418.6060509@yahoo.com.au> In-Reply-To: <3ECB5418.6060509@yahoo.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200305202139.43836.ritchie@ipowerhouse.com> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/404 X-Sequence-Number: 13569 Your in luck http://www.varlena.com/GeneralBits/ Has a good tutorial on that. Cheers Ritchie On Wednesday 21 May 2003 03:25, Benjamin Stewart wrote: > Greetings, > Sorry if this question has been posted before, but I searched the > archives and documentation and was unable to find ther elevant > information or any other developers with first hand experience at this. > > We are writting an application that is web based. We will beusing > struts, java and all the wonderful things that that technology brings. > We have decided to use Postgresql as our DB (v7.3.1). I noticed that one > of the major changes that came with the release of 7.3 was the ability > to return a record set from a function. I have not been able to find any > specific documentation on how to achieve this. If there is any I would > appreciate it if somebody could point it out. > > What i really want is to hear from somebody that has first hand > experience and returning recordsets from postgresql (using pl/pgsql) > functions. The other developer here has investigated and was only able > to find a method that is a little bit tedious, and requires that actual > call to the database from the java code (using jdbc) to define the > fields that we are expecting etc. > > I have worked previously with sybase and we have the ability to create a > stored procedure (different from a user defined function) that returns a > record set that is passed back as and I can use as a standard RS and > itterate throught it etc. I am also able to get meta data about field > names, type etc from the RS. > > Would appreciate any help/suggestions/comments. > > Regards > Ben Stewart > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org