From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rahila Syed <rahilasyed90@gmail.com>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Improvements in psql hooks for variables
Date: Mon, 30 Jan 2017 15:41:33 -0500
Message-ID: <3196.1485808893@sss.pgh.pa.us> (raw)
In-Reply-To: <17593.1485798464@sss.pgh.pa.us>
References: <fa2685de-5262-460d-9eca-f027a5de0d7d@manitou-mail.org>
<11456.1485288184@sss.pgh.pa.us>
<CAH2L28uYE6mRr1rdjgL=MBH-xg1_-viBvjnKR7T59pwZuPFnsw@mail.gmail.com>
<CAH2L28ugrq+N_=i8f6RvWL0NPUhT84CAp8SrDg1RoSc0T7+qBg@mail.gmail.com>
<17593.1485798464@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
I wrote:
> Rahila Syed <rahilasyed90@gmail.com> writes:
>>> + * Switching AUTOCOMMIT from OFF to ON is not allowed when inside a
>>> + * transaction, because it cannot be effective until the current
>>> + * transaction is ended.
>> The above change in autocommit behaviour needs to be documented.
> Yeah, definitely.
Actually ... while trying to write some documentation for that, I found
myself wondering why we need such a prohibition at all. If you are inside
a transaction, then autocommit has no effect until after you get out of
the transaction, and the documentation about it seems clear enough on the
point. Also, if you want to argue that allowing it to change intra-
transaction is too confusing, why would we only forbid this direction
of change and not both directions?
I'm afraid we might be breaking some peoples' scripts to no particularly
good end, so I'm going to leave this out of the committed patch. If you
think this really is a valid change to make, we can commit it separately,
but let's discuss it on its own merits.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, rahilasyed90@gmail.com, daniel@manitou-mail.org, sfrost@snowman.net, ashutosh.bapat@enterprisedb.com
Subject: Re: Improvements in psql hooks for variables
In-Reply-To: <3196.1485808893@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox