pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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: Mon, 21 Nov 2016 08:41:35 -0500
Message-ID: <20161121134135.GF13284@tamriel.snowman.net> (raw)
In-Reply-To: <4d4b8d34-6233-4fb4-93dc-7e929808b982@mm>
References: <7464.1479599073@sss.pgh.pa.us>
	<4d4b8d34-6233-4fb4-93dc-7e929808b982@mm>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Daniel,

* Daniel Verite (daniel@manitou-mail.org) wrote:
> 	Tom Lane wrote:
> 
> > 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.
> 
> Exactly. The scope of the patch is limited to the effect
> of \set assignments to built-in variables.
> 
> > 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.
> 
> +1

Not sure I follow your reply here.  There seems to be broad agreement to
improve how we handle both \set and "special" variables and the code
paths are related and this patch is touching them, so it seems like the
correct next step here is to adjust the patch to update the code based
on that agreement.

Are you working to make those changes?  I'd rather we make the changes
to this code once rather than push what you have now only to turn around
and change it significantly again.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (54+ messages)  latest in thread

Message-ID: <20161121134135.GF13284@tamriel.snowman.net>
Permalink:  ../20161121134135.GF13284@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20161121134135.GF13284@tamriel.snowman.net

 · 

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: sfrost@snowman.net, daniel@manitou-mail.org, tgl@sss.pgh.pa.us, rahilasyed90@gmail.com, ashutosh.bapat@enterprisedb.com
  Subject: Re: Improvements in psql hooks for variables
  In-Reply-To: <20161121134135.GF13284@tamriel.snowman.net>

* 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