Re: returning multiple result sets from a stored procedure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, John Adams <john_adams_mail(at)yahoo(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: returning multiple result sets from a stored procedure
Date: 2010-09-05 18:18:22
Message-ID: 22479.1283710702@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> On 04/09/10 17:16, Merlin Moncure wrote:
>> Curious: is mulitset handling as you see it supported by the current
>> v3 protocol?

> If a multiple return sets from a procedure are returned just like
> multiple return sets from multiple queries, that's already covered by
> the protocol.

Well, the protocol says you can do it, but it would likely require
significant work to make clients deal with it sanely.

Also, the part of the protocol document Heikki is quoting is for the
legacy "simple query" mode. We deliberately designed this behavior
*out* of the extended query mode. So for example you couldn't use
out-of-line parameters with such a feature, unless there's a protocol
redesign.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2010-09-05 18:26:03 Re: returning multiple result sets from a stored procedure
Previous Message Heikki Linnakangas 2010-09-05 18:05:18 Re: returning multiple result sets from a stored procedure