Re: Add \pset options for boolean value display - Mailing list pgsql-hackers

From Chao Li
Subject Re: Add \pset options for boolean value display
Date
Msg-id 5BA8FA39-818E-4F95-A9F5-2A3FED0A5732@gmail.com
Whole thread Raw
In response to Re: Add \pset options for boolean value display  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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 by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Add \pset options for boolean value display
Next
From: Michael Paquier
Date:
Subject: Re: BRIN: Prevent the heapblk overflow during index summarization on very large tables resulting in an infinite loop