pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Otis Gospodnetic <otisg@ivillage.com>
To: pgsql-sql@postgresql.org
Subject: PLPGSQL func. defn. for returning resultset?
Date: Sun, 24 Feb 2002 15:18:54 -0500
Message-ID: <3C794AAE.3080405@ivillage.com> (raw)

Hello,

I need to write some functions/stored procedures in PLPGSQL.
All examples have a return clause that returns a single item (e.g. 
RETURN INTEGER or RETURN VARCHAR, etc.).

However, I need to return a result set (e.g. SELECT user_id, name FROM 
users).  What do I specify in the return part of the FUNCTION definition 
for that?
CREATE FUNCTION foo() RETURNS ????? AS ' .....
What do I put in place of ?????

I could not find any examples for such cases.

Thanks,
Otis




view thread (3+ messages)  latest in thread

Message-ID: <3C794AAE.3080405@ivillage.com>
Permalink:  ../3C794AAE.3080405@ivillage.com/
Also on:    postgresql.org/message-id/3C794AAE.3080405@ivillage.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: otisg@ivillage.com
  Subject: Re: PLPGSQL func. defn. for returning resultset?
  In-Reply-To: <3C794AAE.3080405@ivillage.com>

* 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