Re: Improvements in psql hooks for variables
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rahila Syed <rahilasyed90@gmail.com>
Cc: Daniel Verite <daniel@manitou-mail.org>,
Stephen Frost <sfrost@snowman.net>,
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-01-30T20:41:33Z
Lists: 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
Commits
-
Clean up psql's behavior for a few more control variables.
- fd6cd698031d 10.0 landed
-
Make psql's \set display variables in alphabetical order.
- c3e3844a92fe 10.0 landed
-
Improve psql's behavior for \set and \unset of its control variables.
- 86322dc7e013 10.0 landed
-
Make psql reject attempts to set special variables to invalid values.
- 511ae628f31b 10.0 landed