pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ed Cox <ed@infojunkie.com>
To: pgsql-sql@postgresql.org
Subject: How can I return multiple rows from a FUNCTION? (revised)
Date: Sat, 5 Dec 1998 16:35:13 -0800
Message-ID: <000e01be20b0$4f310c60$600c2599@JEFFERSON> (raw)

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

view thread (2+ messages)

Message-ID: <000e01be20b0$4f310c60$600c2599@JEFFERSON>
Permalink:  ../000e01be20b0$4f310c60$600c2599@JEFFERSON/
Also on:    postgresql.org/message-id/000e01be20b0$4f310c60$600c2599@JEFFERSON

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: ed@infojunkie.com
  Subject: Re: How can I return multiple rows from a FUNCTION? (revised)
  In-Reply-To: <000e01be20b0$4f310c60$600c2599@JEFFERSON>
  References: <000e01be20b0$4f310c60$600c2599@JEFFERSON>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox