Re: Add \pset options for boolean value display

Поиск
Список
Период
Сортировка
От Chao Li
Тема Re: Add \pset options for boolean value display
Дата
Msg-id 5BA8FA39-818E-4F95-A9F5-2A3FED0A5732@gmail.com
обсуждение исходный текст
Ответ на Re: Add \pset options for boolean value display  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers

> On Oct 21, 2025, at 10:29, David G. Johnston <david.g.johnston@gmail.com> wrote:
>
>  They could probably modify their own query to do that if they really wanted to fool someone and I’m having trouble
acceptingthis happening by accident.  

If they modify queries, the result can visibly correlate to the query, for example:

```
evantest=# select CASE WHEN TRUE THEN 'f' END as t;
 t
---
 f
(1 row)
```

There is no confusion. But if a user did some test by setting “display_true = f” previous and forget about it, there is
ano any indication in current SQL statement but unexpected results might be shown. 

> Do we test for yes/no; oui/non (i.e., foreign language choices); checkmark/X?
>

When I said “basic sanity check”, I only meant something like “display_true” cannot be “false” and “f”.

I won’t argue more. It’s also reasonable to let users take own responsibilities to stay away from wrong behavior.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







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