Re: returning multiple resultset?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: iseyfi(at)vt(dot)edu (ismail)
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: returning multiple resultset?
Date: 2004-02-15 21:21:03
Message-ID: 10638.1076880063@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

iseyfi(at)vt(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2004-02-15 22:02:11 Re: Unable to convert date to tm
Previous Message Tomasz Myrta 2004-02-15 20:11:21 Re: ORDER BY TIMESTAMP_column ASC, NULL first