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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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-26 16:58:04
Message-ID: 20131126165804.GH6597@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-11-26 17:02:37 Re: Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Previous Message Gurjeet Singh 2013-11-26 16:57:45 Cleaner build output when not much has changed