Re: [HACKERS] Improvements in psql hooks for variables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Improvements in psql hooks for variables
Date
Msg-id 3196.1485808893@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Improvements in psql hooks for variables  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Improvements in psql hooks for variables
Re: [HACKERS] Improvements in psql hooks for variables
List pgsql-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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] multivariate statistics (v19)
Next
From: David Rowley
Date:
Subject: Re: [HACKERS] Performance improvement for joins where outer side is unique