Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by hub.org (8.10.1/8.11.0) with ESMTP id e9IFaYW80694 for ; Wed, 18 Oct 2000 11:36:34 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [206.169.43.130] (HELO agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.3) with ESMTP id 1110549; Wed, 18 Oct 2000 08:36:33 -0700 Message-ID: <39EDC375.6CA2D342@agliodbs.com> Date: Wed, 18 Oct 2000 08:36:21 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions X-Mailer: Mozilla 4.73 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: sqllist , Jeff MacDonald Subject: Re: Function that returns a tuple. References: <39EDA670.412D7DFD@certi.ufsc.br> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200010/173 X-Sequence-Number: 1835 Claudio, > How can I write a function in sql or pl- pgsql that returns a set of > tuples ? I've had the same question myself for the past month, which has gone unanswered (hint, hint, Jeff!). Currently I'm using custom functions to build views and then referenceing the views: CREATE FUNCTION fun_generate_statistics ( do a bunch of stuff, ending with: CREATE VIEW vw_generate_statistics ( bunch of stuff); ); Then the front-end code references vw_generate_statistics. Not elegant, but sufficient until I hear from Jeff or Jan Wieck. -Josh Berkus -- ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 436-9166 for law firms, small businesses fax 436-0137 and non-profit organizations. pager 338-4078 San Francisco