Re: Add \pset options for boolean value display - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add \pset options for boolean value display
Date
Msg-id 417647.1761017832@sss.pgh.pa.us
Whole thread Raw
In response to Re: Add \pset options for boolean value display  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Monday, October 20, 2025, David G. Johnston <david.g.johnston@gmail.com>
> wrote:
>> Sympathetic to the concern but opposed to taking on such responsibility.
>> They could probably modify their own query to do that if they really wanted
>> to fool someone and I’m having trouble accepting this happening by
>> accident.  Do we test for yes/no; oui/non (i.e., foreign language choices);
>> checkmark/X?

> Actually, preventing t/f makes sense to me.  Prevents a “hacker” from
> messing with the default outputs in a hard-to-identify manner.  Any other
> value would point to pset being used.

-1.  Yeah, you could reject "\pset true 'f'", but what about
not-obviously-different values such as 'f ', or f with a non-breaking
space, or f with a tab, or yadda yadda yadda?

I went on record as opposed to this entire idea back at the start of
this thread, precisely because I was worried that it could lead to
confusion.  And I remain of the opinion that it's not a great idea.
But if we're going to do it, let's not bother with any fig-leaf
proposals that pretend to partially guard against confusion.

            regards, tom lane



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Proposal for enabling auto-vectorization for checksum calculations
Next
From: Richard Guo
Date:
Subject: Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master