pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedReturning multiple rows from plpgsql function
2+ messages / 2 participants
[nested] [flat]
* Returning multiple rows from plpgsql function
@ 2003-02-17 20:07 Mintoo Lall <tlqmail@yahoo.com>
0 siblings, 1 reply; 2+ messages in thread
From: Mintoo Lall @ 2003-02-17 20:07 UTC (permalink / raw)
To: pgsql-sql
Hi Everybody,
How can I return multiple rows from a plpqsql function. I wanted to write a function which gives me the result of the final select query from a bunch of nested select queries. What return type should use? The return type %ROWTYPE only returns a single row. In SQL function I can do this by stating that the function returns a setof record but it doesnt work in plpgsql function.
Thanks,
Tarun
---------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Returning multiple rows from plpgsql function
@ 2003-02-17 20:18 Stephan Szabo <sszabo@megazone23.bigpanda.com>
parent: Mintoo Lall <tlqmail@yahoo.com>
0 siblings, 0 replies; 2+ messages in thread
From: Stephan Szabo @ 2003-02-17 20:18 UTC (permalink / raw)
To: Mintoo Lall <tlqmail@yahoo.com>; +Cc: pgsql-sql
On Mon, 17 Feb 2003, Mintoo Lall wrote:
> How can I return multiple rows from a plpqsql function. I wanted to
> write a function which gives me the result of the final select query
> from a bunch of nested select queries. What return type should use?
> The return type %ROWTYPE only returns a single row. In SQL function I
> can do this by stating that the function returns a setof record but it
> doesnt work in plpgsql function.
You might want to look at the Set Returning Functions document at
techdocs.postgresql.org.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-02-17 20:18 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-17 20:07 Returning multiple rows from plpgsql function Mintoo Lall <tlqmail@yahoo.com>
2003-02-17 20:18 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
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