Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Date
Msg-id CA+Tgmoawha6CDAbyyzz2sJPJ4yReh+OVfSa8710GYMGNWeuVOg@mail.gmail.com
Whole thread Raw
In response to Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block  (Bruce Momjian <bruce@momjian.us>)
Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Fri, Nov 8, 2013 at 5:36 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> [ I'm so far behind ... ]
>
> Bruce Momjian <bruce@momjian.us> writes:
>> Applied.  Thank you for all your suggestions.
>
> I thought the suggestion had been to issue a *warning*.  How did that
> become an error?  This patch seems likely to break applications that
> may have just been harmlessly sloppy about when they were issuing
> SETs and/or what flavor of SET they use.  We don't for example throw
> an error for START TRANSACTION with an open transaction or COMMIT or
> ROLLBACK without one --- how can it possibly be argued that these
> operations are more dangerous than those cases?
>
> I'd personally have voted for using NOTICE.

Well, LOCK TABLE throws an error, so it's not without precedent.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Race condition in b-tree page deletion
Next
From: Albe Laurenz
Date:
Subject: Re: UTF8 national character data type support WIP patch and list of open issues.