Re: BEGIN inside transaction should be an error

From: Mark Dilger <pgsql(at)markdilger(dot)com>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Subject: Re: BEGIN inside transaction should be an error
Date: 2006-05-10 20:23:47
Message-ID: 44624BD3.1030205@markdilger.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Martijn van Oosterhout wrote:
> On Wed, May 10, 2006 at 09:41:46AM +0200, Mario Weilguni wrote:
>
>>>>Could we make BEGIN fail when we already are in a transaction?
>>>
>>>We could, but it'd probably break about as many apps as it fixed.
>>>I wonder whether php shouldn't be complaining about this, instead
>>>--- doesn't php have its own ideas about controlling where the
>>>transaction commit points are?
>>
>>In fact it would break many application, so it should be at least controllable
>>by a setting or GUC.
>
>
> You want to make a GUC that makes:
>
> BEGIN;
> BEGIN;
>
> Leave you with an aborted transaction? That seems like a singularly
> useless feature...
>
> Have a nice day,

Or if you really want to screw things up, you could require COMMIT; COMMIT; to
finish off the transaction started by BEGIN; BEGIN; We could just silently keep
the transaction alive after the first COMMIT; ;)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-05-10 20:24:45 Re: sblock state on FreeBSD 6.1
Previous Message Alvaro Herrera 2006-05-10 20:17:44 Re: [TODO] Allow commenting of variables ...

Browse pgsql-patches by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-10 21:03:51 Re: BEGIN inside transaction should be an error
Previous Message Mike Benoit 2006-05-10 16:23:38 Re: BEGIN inside transaction should be an error