Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vB3BZ-009fuz-4o for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Oct 2025 03:37:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vB3BY-0068YK-22 for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Oct 2025 03:37:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vB3BX-0068YC-Oe for pgsql-hackers@lists.postgresql.org; Tue, 21 Oct 2025 03:37:18 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vB3BU-003Lhw-1v for pgsql-hackers@lists.postgresql.org; Tue, 21 Oct 2025 03:37:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 59L3bCQJ417648; Mon, 20 Oct 2025 23:37:12 -0400 From: Tom Lane To: "David G. Johnston" cc: Chao Li , =?UTF-8?Q?=C3=81lvaro_Herrera?= , PostgreSQL Hackers Subject: Re: Add \pset options for boolean value display In-reply-to: References: <202510201419.mpror4maizbg@alvherre.pgsql> <385850DE-F52D-4E37-9207-50FD51DF6F9A@gmail.com> Comments: In-reply-to "David G. Johnston" message dated "Mon, 20 Oct 2025 22:48:04 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <417646.1761017832.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 20 Oct 2025 23:37:12 -0400 Message-ID: <417647.1761017832@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Monday, October 20, 2025, David G. Johnston > 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