Re: returning multiple resultset? - Mailing list pgsql-sql

From Tom Lane
Subject Re: returning multiple resultset?
Date
Msg-id 10638.1076880063@sss.pgh.pa.us
Whole thread Raw
In response to returning multiple resultset?  (iseyfi@vt.edu (ismail))
List 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


pgsql-sql by date:

Previous
From: "Senthil Kumar S"
Date:
Subject: writing a dynamic sql
Next
From: Tomasz Myrta
Date:
Subject: Re: ORDER BY TIMESTAMP_column ASC, NULL first