X-Original-To: pgsql-admin@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 986D39254FB for ; Fri, 23 May 2003 13:51:57 -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 38612-07 for ; Fri, 23 May 2003 13:51:50 -0400 (EDT) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by developer.postgresql.org (Postfix) with ESMTP id 8E9F092515E for ; Fri, 23 May 2003 13:36:52 -0400 (EDT) Received: from [206.19.64.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.0.6) with ESMTP-TLS id 1763337; Fri, 23 May 2003 10:12:35 -0700 Message-ID: <3ECE5BBE.7090905@joeconway.com> Date: Fri, 23 May 2003 10:34:54 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sidar Lopez Cruz Cc: pgsql-admin@postgresql.org Subject: Re: return multiple rows References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/340 X-Sequence-Number: 8902 Sidar Lopez Cruz wrote: > how to return multiple rows and columns from functions > See: http://techdocs.postgresql.org/guides/SetReturningFunctions http://www.brasileiro.net:8080/postgres/cookbook/view-one-recipe.adp?recipe_id=11378 http://www.varlena.com/GeneralBits/26.html There are plpgsql and sql function examples in the mailing list archives. Couple of examples: http://archives.postgresql.org/pgsql-general/2002-10/msg00022.php and http://archives.postgresql.org/pgsql-general/2002-12/msg00426.php And finally, in the manual see: general -> http://developer.postgresql.org/docs/postgres/xfunc-tablefunctions.html sql -> http://developer.postgresql.org/docs/postgres/xfunc-sql.html (sec 9.2.4) C -> http://developer.postgresql.org/docs/postgres/xfunc-c.html (sec 9.5.6) plpgsql -> http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html usage -> http://developer.postgresql.org/docs/postgres/sql-select.html (from_item, inputs, from clause, usage) Joe