pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: Rahila Syed <rahilasyed90@gmail.com>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Improvements in psql hooks for variables
Date: Sat, 19 Nov 2016 18:44:33 -0500
Message-ID: <7464.1479599073@sss.pgh.pa.us> (raw)
In-Reply-To: <20161119233603.GC13284@tamriel.snowman.net>
References: <CAH2L28tsJWuYtcbqgWYmdeuXshiPFta6S1OxOx5_O62Xss8r6g@mail.gmail.com>
	<b0c61324-8ad3-413e-bb88-5c71d6412bba@mm>
	<20161119233603.GC13284@tamriel.snowman.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Stephen Frost <sfrost@snowman.net> writes:
> In reviewing this patch, I also noticed that it's set up to assume a
> 'true' result when a variable can't be parsed by ParseVariableBool.

I suppose that's meant to be backwards-compatible with the current
behavior:

regression=# \timing foo
unrecognized value "foo" for "\timing"; assuming "on"
Timing is on.

but I agree that if we're changing things in this area, that would
be high on my list of things to change.  I think what we want going
forward is to disallow setting "special" variables to invalid values,
and that should hold both for regular variables that have special
behaviors, and for the special-syntax cases like \timing.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (54+ messages)  latest in thread

Message-ID: <7464.1479599073@sss.pgh.pa.us>
Permalink:  ../7464.1479599073@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7464.1479599073@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sfrost@snowman.net, daniel@manitou-mail.org, rahilasyed90@gmail.com, ashutosh.bapat@enterprisedb.com
  Subject: Re: Improvements in psql hooks for variables
  In-Reply-To: <7464.1479599073@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox