From: | Jan Wieck <janwieck(at)yahoo(dot)com> |
---|---|
To: | Otis Gospodnetic <otisg(at)ivillage(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: PLPGSQL func. defn. for returning resultset? |
Date: | 2002-02-25 19:09:28 |
Message-ID: | 200202251909.g1PJ9SA01207@saturn.janwieck.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Otis Gospodnetic wrote:
> 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.
And it would really surprise me if you could find examples of
that. The only way you currently can return a result set
would be through a cursor, opened in your function.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Samuel J. Sutjiono | 2002-02-25 19:12:26 | Re: [GENERAL] Sort problem |
Previous Message | Oliver Elphick | 2002-02-25 17:46:47 | Re: About referential integrity. |