pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedreturning multiple resultset?
2+ messages / 2 participants
[nested] [flat]
* returning multiple resultset?
@ 2004-02-09 23:27 ismail <iseyfi@vt.edu>
0 siblings, 1 reply; 2+ messages in thread
From: iseyfi@vt.edu @ 2004-02-09 23:27 UTC (permalink / raw)
To: pgsql-sql
Hello all,
I am fairly new to PostgreSQL and I am right now converting a database
from SQL server. SQL server can return multiple select statements in
the function body. Is there any way to return a function with two
different resultsets?
select * from table1;
select * from table2;
Thanks for your time and help
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: returning multiple resultset?
@ 2004-02-15 21:21 Tom Lane <tgl@sss.pgh.pa.us>
parent: ismail <iseyfi@vt.edu>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2004-02-15 21:21 UTC (permalink / raw)
To: iseyfi@vt.edu; +Cc: pgsql-sql
iseyfi@vt.edu (ismail) writes:
> I am fairly new to PostgreSQL and I am right now converting a database
> from SQL server. SQL server can return multiple select statements in
> the function body. Is there any way to return a function with two
> different resultsets?
You can fake it in some cases by returning opened cursors. See the
plpgsql docs' discussion of working with cursors. Of course this will
only work for resultsets that you can specify as a SQL query.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-02-15 21:21 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-02-09 23:27 returning multiple resultset? ismail <iseyfi@vt.edu>
2004-02-15 21:21 ` Tom Lane <tgl@sss.pgh.pa.us>
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