Re: Improvements in psql hooks for variables

Daniel Verite <daniel@manitou-mail.org>

From: "Daniel Verite" <daniel@manitou-mail.org>
To: "Rahila Syed" <rahilasyed90@gmail.com>
Cc: "Stephen Frost" <sfrost@snowman.net>,"Tom Lane" <tgl@sss.pgh.pa.us>,"Ashutosh Bapat" <ashutosh.bapat@enterprisedb.com>,"pgsql-hackers" <pgsql-hackers@postgresql.org>
Date: 2016-12-23T21:54:14Z
Lists: pgsql-hackers

Attachments

	Rahila Syed wrote:

> Kindly consider following comments,

Sorry for taking so long to post an update.

> There should not be an option to the caller to not follow the behaviour of
> setting valid to either true/false.

OK, fixed.

> In following examples, incorrect error message is begin displayed.
> “ON_ERROR_ROLLBACK” is an enum and also
> accepts value 'interactive' .  The error message says boolean expected.

Indeed. Fixed for all callers of ParseVariableBool() than can accept 
non-boolean arguments too.


Best regards,
-- 
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

Commits

  1. Clean up psql's behavior for a few more control variables.

  2. Make psql's \set display variables in alphabetical order.

  3. Improve psql's behavior for \set and \unset of its control variables.

  4. Make psql reject attempts to set special variables to invalid values.