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