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-26 03:12:43 |
Message-ID: | 20131126031243.GA24485@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 25, 2013 at 10:04:19PM -0500, Robert Haas wrote:
> On Mon, Nov 25, 2013 at 7:19 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > On Fri, Nov 22, 2013 at 01:19:55PM -0500, Bruce Momjian wrote:
> >> On Fri, Nov 22, 2013 at 12:17:41PM -0500, Bruce Momjian wrote:
> >> > Good points. I have modified the attached patch to do as you suggested.
> >>
> >> Also, I have read through the thread and summarized the positions of the
> >> posters:
> >>
> >> 9.3 WARNING ERROR
> >> SET none Tom, DavidJ, AndresF Robert, Kevin
> >> SAVEPOINT error Tom, DavidJ, Robert, AndresF, Kevin
> >> LOCK, DECLARE error Tom, DavidJ, Robert, AndresF, Kevin
> >>
> >> Everyone seems to agree that SAVEPOINT, LOCK, and DECLARE should remain
> >> as errors. Everyone also seems to agree that BEGIN and COMMIT should
> >> remain warnings, and ABORT should be changed from notice to warning.
> >>
> >> Our only disagreement seems to be how to handle the SET commands, which
> >> used to report nothing. Would anyone else like to correct or express an
> >> opinion? Given the current vote count and backward-compatibility,
> >> warning seems to be the direction we are heading.
> >
> > Patch applied.
>
> I must be missing something. The commit message for this patch says:
>
> Also change ABORT outside of a transaction block from notice to
> warning.
>
> 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.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2013-11-26 03:30:03 | Re: Get more from indices. |
Previous Message | Robert Haas | 2013-11-26 03:04:19 | Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block |