Re: Add \pset options for boolean value display
| От | Tom Lane | 
|---|---|
| Тема | Re: Add \pset options for boolean value display | 
| Дата | |
| Msg-id | 417647.1761017832@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | Re: Add \pset options for boolean value display ("David G. Johnston" <david.g.johnston@gmail.com>) | 
| Список | 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 по дате отправления: