Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8FKj-0003rH-TF for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Nov 2016 23:46:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c8FKi-0005N0-Jv for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Nov 2016 23:46:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c8FJJ-0003WH-Lg for pgsql-hackers@postgresql.org; Sat, 19 Nov 2016 23:44:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c8FJF-00067n-8I for pgsql-hackers@postgresql.org; Sat, 19 Nov 2016 23:44:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uAJNiXRr007465; Sat, 19 Nov 2016 18:44:33 -0500 From: Tom Lane To: Stephen Frost cc: Daniel Verite , Rahila Syed , Ashutosh Bapat , pgsql-hackers Subject: Re: Improvements in psql hooks for variables In-reply-to: <20161119233603.GC13284@tamriel.snowman.net> References: <20161119233603.GC13284@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Sat, 19 Nov 2016 18:36:03 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7463.1479599073.1@sss.pgh.pa.us> Date: Sat, 19 Nov 2016 18:44:33 -0500 Message-ID: <7464.1479599073@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Stephen Frost 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