pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: Álvaro Herrera <alvherre@kurilemu.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Add \pset options for boolean value display
Date: Mon, 20 Oct 2025 23:37:12 -0400
Message-ID: <417647.1761017832@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYycabxpvPx-o6Q1WKy5Ph4PFiYrKoDQQT7TaL1gT+5jw@mail.gmail.com>
References: <CAKFQuwZaeRT3Nco9sPd-9ZwEuStUZLU+AKH9+iRf4978T59kRg@mail.gmail.com>
	<202510201419.mpror4maizbg@alvherre.pgsql>
	<CAKFQuwYWdocoCsfDOZhY2xALM1U89O4bP=Ou266pAOdVojgpfw@mail.gmail.com>
	<385850DE-F52D-4E37-9207-50FD51DF6F9A@gmail.com>
	<CAKFQuwbJ+Fn9u0a4hYWoyxA8FK-fD=+xGisrs6rjgeqcRtEf5w@mail.gmail.com>
	<CAKFQuwYycabxpvPx-o6Q1WKy5Ph4PFiYrKoDQQT7TaL1gT+5jw@mail.gmail.com>

"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





view thread (23+ messages)  latest in thread

Message-ID: <417647.1761017832@sss.pgh.pa.us>
Permalink:  ../417647.1761017832@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/417647.1761017832@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, david.g.johnston@gmail.com, li.evan.chao@gmail.com, alvherre@kurilemu.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: Add \pset options for boolean value display
  In-Reply-To: <417647.1761017832@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