Re: Support for functions returning mutliple result sets? - Mailing list pgsql-general

From Tom Lane
Subject Re: Support for functions returning mutliple result sets?
Date
Msg-id 23868.1074831716@sss.pgh.pa.us
Whole thread Raw
In response to Support for functions returning mutliple result sets?  (<bill.postgresql-users@mcmilleon.com>)
List pgsql-general
<bill.postgresql-users@mcmilleon.com> writes:
> Does postgres support returning multiple sets from a function?

Not directly.  You can fake it in some cases by returning several open
cursors and expecting the caller to fetch from those cursors.  However,
if you can't write SQL queries that can be executed to return each of
the needed return sets, you're out of luck --- there's nothing so
flexible as RETURN NEXT.

I don't think this is an unfixable limitation; the needed mechanisms
all exist, it's a matter of figuring out what a reasonable syntactic
representation would look like.  Any thoughts?

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: embedded/"serverless" (Re: serverless postgresql)
Next
From: Tom Lane
Date:
Subject: Re: Parsing bug?