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

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Cc: 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-20 22:03:52
Message-ID: 1384985032.28242.YahooMailNeo@web162905.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> Well, Tom and I are on opposite sides of this, I suppose.  I
> prefer ERROR for everything other than the top-level transaction
> commands, and see no benefit from opting for a wishy-washy
> warning.

+1

If the user issued a local command outside of a transaction there
is an extremely high probability that they intended to either set
session state or affect the next transaction.  Either way,
modifying the database with the wrong setting could lead to data
corruption -- at least for some of these settings.  IMO it would be
foolish to insist on consistency with prior releases rather than on
giving people the best shot at preventing, or at least promptly
identifying the cause of, data corruption.

Obviously, changing the level of these is not material for back-
patching.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-11-20 22:07:16 Re: additional json functionality
Previous Message Robert Haas 2013-11-20 21:58:35 Re: [PATCH] Add transforms feature