Skip site navigation (1) Skip section navigation (2)

Re: returning multiple result sets from a stored procedure

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: 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-04 14:10:14
Message-ID: AANLkTikShFObZ-uboSuTJHfsVdH3M+91hK6w6pd5QZEQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
2010/9/4 Merlin Moncure <mmoncure(at)gmail(dot)com>:
> On Fri, Sep 3, 2010 at 4:07 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>>
>>> I noticed in postgres you cannot return multiple result sets from a
>>> stored procedure (surprisingly as it looks like a very good dbms).
>>
>> That feature has been on the TODO list for years.  However, nobody has
>> stepped forward to either write it, or to fund working on it.  If your
>> company has programmers or money to build this feature, it could
>> probably get done fairly quickly (as in, next version).
>
> Also as mentioned upthread there are effective workarounds if you poke
> around a bit.  This is a FAQ, and there are about 3-4 solid methods
> (if you search the archives) that cover most problems you would be
> looking at multiple results sets to solve.  I suppose this is why
> there hasn't been more of an effort to do this earlier.  People asking
> for this are typically dispossessed SQL server developers who haven't
> quite gotten used to the postgres way of things. Not that proper
> stored procedures wouldn't be great -- they would be -- but they are
> not the only way to solve these types of problems.

I had a prototype that can do multirecordset. But implementation of
non transact procedures needs a hundreds  hours of work:

* outer SPI
* parametrization for non planner statements - for CALL statement
* explicit transaction control for procedures.
* client API support for multirecordset
* better support for OUT variables.

Regards

Pavel Stehule
>
> merlin
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

pgsql-hackers by date

Next:From: Merlin MoncureDate: 2010-09-04 14:16:15
Subject: Re: returning multiple result sets from a stored procedure
Previous:From: Thom BrownDate: 2010-09-04 13:46:49
Subject: Re: Streaming a base backup from master

Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group