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

From Bruce Momjian
Subject Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Date
Msg-id 20131126162950.GA6321@momjian.us
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  (David Johnston <polobo@yahoo.com>)
Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Tue, Nov 26, 2013 at 11:22:39AM -0500, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > On Mon, Nov 25, 2013 at 10:04:19PM -0500, Robert Haas wrote:
> >> But the documentation says:
> >> 
> >> -   Issuing <command>ABORT</> when not inside a transaction does
> >> -   no harm, but it will provoke a warning message.
> >> +   Issuing <command>ABORT</> outside of a transaction block has no effect.
> >> 
> >> Those things are not the same.
> 
> > Uh, I ended up mentioning "no effect" to highlight it does nothing,
> > rather than mention a warning.  Would people prefer I say "warning"?  Or
> > should I say "issues a warning because it has no effect" or something? 
> > It is easy to change.
> 
> I'd revert the change Robert highlights above.  ISTM you've changed the
> code to match the documentation; why would you then change the docs?

Well, I did it to make it consistent.  The question is what to write for
_all_ of the new warnings, including SET.  Do we say "warning", do we
say "it has no effect", or do we say both?  The ABORT is a just one case
of that.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Extension Templates S03E11
Next
From: Peter Eisentraut
Date:
Subject: Re: Logging WAL when updating hintbit