Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
Cc: "Bruce Momjian" <bruce(at)momjian(dot)us>, "Vladimir Dzhuvinov" <vd(at)valan(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?
Date: 2008-10-16 19:37:50
Message-ID: 162867790810161237n7b18506ewb528e9e89a97e612@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2008/10/16 Merlin Moncure <mmoncure(at)gmail(dot)com>:
> On Wed, Oct 15, 2008 at 5:48 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>
>> Below is a very good summary of the limitations of our function
>> capabilities compared to procedures, e.g.:
>>
>> o no transaction control in functions
>> o no multi-query return values without using special syntax
>>
>> I don't think we can cleanly enable the second capability, but could we
>> allow transaction control for functions that are not called inside a
>> multi-statement transaction?
>>
>> FYI, right now when you call a function all statements are assumed to be
>> in a single transaction, and allowing transaction control inside a
>> function would mean that each statement in a function is its own
>> transaction _unless_ transaction control is specified. There would
>> certainly need to be special syntax to enable this.
>>
>> Is there a TODO here?
>
> I don't think so, except that we need a TODO for proper stored
> procedure support if there is not one already. Proper SPs have been
> much discussed, Pavel spearheading what effort has been done.
>
> Being able to manually do transactions for functions would be nice
> certainly, but I suspect this is a big part of the challenge for
> proper SPs.
>

call statement should to live outside implicit transaction, so it's
possible. It's simple in SQL/PSM, that is designed with transaction
controll management.

Pavel

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2008-10-16 19:44:35 Re: Optimizing projections containing unused columns
Previous Message Andrus 2008-10-16 19:33:28 Re: Optimizing projections containing unused columns