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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Johnston <polobo(at)yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Date: 2013-11-19 18:07:39
Message-ID: 20131119180739.GN28149@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 19, 2013 at 12:24:50PM -0500, Tom Lane wrote:
> David Johnston <polobo(at)yahoo(dot)com> writes:
> > Robert Haas wrote
> >> I don't think it's worth breaking backward compatibility. I'm not
> >> entirely sure what I would have decided here in a vacuum, but at this
> >> point existing precedent seems determinative.
>
> > Well, at this point we have already broken backward compatibility by
> > releasing this. With Tom's thread necromancy I missed the fact this got
> > released in 9.3
>
> Uh, what? The commit I'm objecting to is certainly not in 9.3.
> It's this one:

Right.

> Author: Bruce Momjian <bruce(at)momjian(dot)us>
> Branch: master [a54141aeb] 2013-10-04 13:50:28 -0400
>
> Issue error on SET outside transaction block in some cases
>
> Issue error for SET LOCAL/CONSTRAINTS/TRANSACTION outside a transaction
> block, as they have no effect.
>
> Per suggestion from Morten Hustveit
>
> I agree that it's too late to reconsider the behavior of pre-existing
> cases such as LOCK TABLE, but that doesn't mean I can't complain about
> this one.

OK, so I just posted a summary of what we have now, and a patch that
switches them all to warning. Are you saying we should just switch the
new ones to warnings?

Seeing as these commands have always been useless, I don't see the big
argument for backward compatibility myself.

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

+ Everyone has their own god. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-11-19 18:08:05 Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block
Previous Message Bruce Momjian 2013-11-19 18:05:01 Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block