Re: Help with BEGIN/COMMIT within a transaction

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Doug McNaught <doug(at)mcnaught(dot)org>
Cc: Bhavesh Jardosh <perltastic(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Help with BEGIN/COMMIT within a transaction
Date: 2003-08-04 19:50:04
Message-ID: ktdtiv4pq5i3g8scp9jgden86i29hnqarn@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02 Aug 2003 09:42:05 -0400, Doug McNaught <doug(at)mcnaught(dot)org>
wrote:
>Bhavesh Jardosh <perltastic(at)yahoo(dot)com> writes:
>> I need to use BEGIN/COMMIT within a stored procedure [...]
>
>You can't currently do this. Calls to functions are already inside a
>(possibly implicit) transaction, so calling BEGIN inside a function
>would have to start a subtransaction, which PG doesn't currently
>support. There is some possibility that this feature will be in 7.5,
>but that won't be coming out anmytime soon.

Subtransactions won't help, because the OP wants

>[...] to commit from within a cursor loop so that the changes are visible in
>other sessions as soon as they are done.

Changes will not be visible to other sessions until the *main*
transaction commits.

Servus
Manfred

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sean Chittenden 2003-08-04 19:57:55 Re: plPHP -- sort of an announcement.. but not commercial
Previous Message Joe Conway 2003-08-04 19:43:00 Re: plPHP -- sort of an announcement.. but not commercial