Received: from localhost.localdomain (66-108-148-98.nyc.rr.com [66.108.148.98]) by postgresql.org (Postfix) with ESMTP id 7321F47597E for ; Sun, 24 Feb 2002 15:18:54 -0500 (EST) Received: from ivillage.com (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id g1OKIsF30669 for ; Sun, 24 Feb 2002 15:18:54 -0500 Message-ID: <3C794AAE.3080405@ivillage.com> Date: Sun, 24 Feb 2002 15:18:54 -0500 From: Otis Gospodnetic User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.8) Gecko/20020205 X-Accept-Language: en-us MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: PLPGSQL func. defn. for returning resultset? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200202/347 X-Sequence-Number: 6769 Hello, I need to write some functions/stored procedures in PLPGSQL. All examples have a return clause that returns a single item (e.g. RETURN INTEGER or RETURN VARCHAR, etc.). However, I need to return a result set (e.g. SELECT user_id, name FROM users). What do I specify in the return part of the FUNCTION definition for that? CREATE FUNCTION foo() RETURNS ????? AS ' ..... What do I put in place of ????? I could not find any examples for such cases. Thanks, Otis