Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE
Date
Msg-id CAKFQuwZCdsn+atEvnWCAgdtOq96A1-YSJBquKvtKQvZJPy5Tjg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE  (Chris BSomething <xpusostomos@gmail.com>)
List pgsql-bugs
On Wednesday, February 19, 2025, Chris BSomething <xpusostomos@gmail.com> wrote:

And yet this super dangerous behavior which could sit dormant and undiscovered in a view in a large computer system, doesn't bother anyone? OK, whatever.


 There a quite a few of those in SQL…testing queries is a requirement.  And being explicit with types is strongly suggested.

To be clear, the complaint is that we allow input functions such as varchar(n) and char to truncate their inputs as opposed to erroring out if the input length is too long. Right?  If not I’m still confused as to what exact behavior you believe is dangerous.

David J.

pgsql-bugs by date:

Previous
From: Chris BSomething
Date:
Subject: Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE
Next
From: Greg Sabino Mullane
Date:
Subject: Re: BUG #18817: Security Bug Report: Plaintext Password Exposure in Logs