PL/PgSQL - returning multiple columns ...

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: PL/PgSQL - returning multiple columns ...
Date: 2005-02-02 21:10:59
Message-ID: 20050202170643.R27579@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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
<table>', 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(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-02-02 21:24:39 Re: pg_restore problem
Previous Message Joel Fradkin 2005-02-02 20:46:46 Re: pg_restore problem