X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7B0988B9B48 for ; Wed, 2 Feb 2005 21:11:09 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43933-07 for ; Wed, 2 Feb 2005 21:10:58 +0000 (GMT) Received: from ganymede.hub.org (blk-224-186-245.eastlink.ca [24.224.186.245]) by svr1.postgresql.org (Postfix) with ESMTP id 8982D8B9D56 for ; Wed, 2 Feb 2005 21:10:58 +0000 (GMT) Received: by ganymede.hub.org (Postfix, from userid 1000) id 1D9E2372FB; Wed, 2 Feb 2005 17:10:59 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 1CD53372F7 for ; Wed, 2 Feb 2005 17:10:59 -0400 (AST) Date: Wed, 2 Feb 2005 17:10:59 -0400 (AST) From: "Marc G. Fournier" X-X-Sender: scrappy@ganymede.hub.org To: pgsql-sql@postgresql.org Subject: PL/PgSQL - returning multiple columns ... Message-ID: <20050202170643.R27579@ganymede.hub.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.094 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL X-Spam-Level: * X-Archive-Number: 200502/48 X-Sequence-Number: 20159 I have a function that I want to return 'server_name, avg(load_avg)' ... if I wanted to return matching rows in a table, I can do a 'setof ', with a for loop inside ... but what do I set the 'RETURNS' to if I want to return the results of query that returns only two fields of a table, or, in the case of the above, one column and oen 'group by' column? thanks ... ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664