How can I return multiple rows from a FUNCTION? (revised) - Mailing list pgsql-sql

From Ed Cox
Subject How can I return multiple rows from a FUNCTION? (revised)
Date
Msg-id 000e01be20b0$4f310c60$600c2599@JEFFERSON
Whole thread Raw
List 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

pgsql-sql by date:

Previous
From: "Ed Cox"
Date:
Subject: How can I return multiple rows from a FUNCTION?
Next
From: pierre
Date:
Subject: postmaster tuning commands