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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(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-27 21:44:02
Message-ID: 20131127214402.GC3785@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 27, 2013 at 03:59:31PM -0500, Robert Haas wrote:
> On Tue, Nov 26, 2013 at 5:02 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > On Tue, Nov 26, 2013 at 01:58:04PM -0300, Alvaro Herrera wrote:
> >> Bruce Momjian escribió:
> >> > On Tue, Nov 26, 2013 at 11:22:39AM -0500, Tom Lane wrote:
> >>
> >> > > > 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.
> >>
> >> Maybe "it emits a warning and otherwise has no effect"? Emitting a
> >> warning is certainly not doing nothing; as has been pointed out in the
> >> SSL renegotiation thread, it might cause the log to fill disk.
> >
> > OK, doc patch attached.
>
> Seems broadly reasonable, but I'd use "no other effect" throughout.

That sounds awkward, e.g.:

Issuing <command>ROLLBACK</> outside of a transaction
block emits a warning but has no other effect.

I could live with this:

Issuing <command>ROLLBACK</> outside of a transaction
block has no effect except emitting a warning.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-11-27 22:24:35 Re: MultiXact pessmization in 9.3
Previous Message Andres Freund 2013-11-27 21:43:20 Re: doPickSplit stack buffer overflow in XLogInsert?