How can I return multiple rows from a FUNCTION? (revised)

From: "Ed Cox" <ed(at)infojunkie(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: How can I return multiple rows from a FUNCTION? (revised)
Date: 1998-12-06 00:35:13
Message-ID: 000e01be20b0$4f310c60$600c2599@JEFFERSON
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Is it possible to have a FUNCTION in Postgres that returns multiple rows? Something like:

CREATE FUNCTION foo()
RETURNS ???
AS 'SELECT * FROM bar'
LANGUAGE 'sql';

If not, can you suggest a way to encapsulate this functionality? I'd like to keep all SQL code out of my GSP code.

Thanks very much,
Ed Cox

Browse pgsql-sql by date

  From Date Subject
Next Message pierre 1998-12-06 04:36:55 postmaster tuning commands
Previous Message Ed Cox 1998-12-06 00:32:56 How can I return multiple rows from a FUNCTION?