Re: Improvements in psql hooks for variables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Rahila Syed <rahilasyed90(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: Improvements in psql hooks for variables
Date: 2017-01-31 00:13:40
Message-ID: 9572.1485821620@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

So I pushed this, and the buildfarm members that are testing RedisFDW
immediately fell over:

*** /home/andrew/bf/root/HEAD/redis_fdw.build/test/expected/redis_fdw.out 2017-01-30 18:20:27.440677318 -0500
--- /home/andrew/bf/root/HEAD/redis_fdw.build/test/results/redis_fdw.out 2017-01-30 18:32:33.404677320 -0500
***************
*** 26,31 ****
--- 26,32 ----
options (database '15', tabletype 'zset');
-- make sure they are all empty - if any are not stop the script right now
\set ON_ERROR_STOP
+ unrecognized value "" for "ON_ERROR_STOP": boolean expected
do $$
declare
rows bigint;

======================================================================

Evidently, this test script is relying on the preceding behavior that
setting a bool variable to an empty string was equivalent to setting
it to "true". If it's just that script I would be okay with saying
"well, it's a bug in that script" ... but I'm a bit worried that this
may be the tip of the iceberg, ie maybe a lot of people have done
things like this. Should we reconsider the decision to reject empty
strings in ParseVariableBool?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2017-01-31 00:13:56 Re: Performance improvement for joins where outer side is unique
Previous Message David Rowley 2017-01-31 00:10:02 Re: Performance improvement for joins where outer side is unique