Re: Add \pset options for boolean value display

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Add \pset options for boolean value display
Дата
Msg-id CAKFQuwYycabxpvPx-o6Q1WKy5Ph4PFiYrKoDQQT7TaL1gT+5jw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add \pset options for boolean value display  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Add \pset options for boolean value display
Список pgsql-hackers
On Monday, October 20, 2025, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Monday, October 20, 2025, Chao Li <li.evan.chao@gmail.com> wrote:
The other thing I am thinking is that, with this patch, users are allowed to display arbitrary strings for true/false, if a user mistakenly set display_true to f and display_false to t, which will load to misunderstanding.

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.

David J.
 

В списке pgsql-hackers по дате отправления: