Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Morten Hustveit <morten(at)eventures(dot)vc>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Date: 2013-11-08 22:36:23
Message-ID: 30828.1383950183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[ I'm so far behind ... ]

Bruce Momjian <bruce(at)momjian(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-11-08 23:00:53 Re: unaccent module - two params function should be immutable
Previous Message Kevin Grittner 2013-11-08 22:33:50 Re: pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value