Re: Improvements in psql hooks for variables
Daniel Verite <daniel@manitou-mail.org>
From: "Daniel Verite" <daniel@manitou-mail.org>
To: "Daniel Verite" <daniel@manitou-mail.org>
Cc: "Stephen Frost" <sfrost@snowman.net>,"Tom Lane"
<tgl@sss.pgh.pa.us>,"Rahila Syed" <rahilasyed90@gmail.com>,"Ashutosh
Bapat" <ashutosh.bapat@enterprisedb.com>,"pgsql-hackers"
<pgsql-hackers@postgresql.org>
Date: 2016-11-23T12:17:31Z
Lists: pgsql-hackers
Attachments
- psql-var-hooks-v5.patch (text/plain) patch v5
I wrote: > So I went through the psql commands which don't fail on parse errors > for booleans > [...] Here's a v5 patch implementing the suggestions mentioned upthread: all meta-commands calling ParseVariableBool() now fail when the boolean argument can't be parsed successfully. Also includes a minor change to SetVariableAssignHook() that now returns the result of the hook it calls after installing it. It doesn't make any difference in psql behavior since callers of SetVariableAssignHook() ignore its return value, but it's more consistent with SetVariable(). Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
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