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
Ответ на
Список
Дерево обсуждения
Add \pset options for boolean value display "David G. Johnston" <david.g.johnston@gmail.com>


> On Oct 21, 2025, at 10:29, David G. Johnston  wrote:
> 
>  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. 

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 a no 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 по дате отправления
От: David G. Johnston
Дата:
FAQ