Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Chris BSomething <xpusostomos@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Bug List <pgsql-bugs@lists.postgresql.org>
Date: 2025-02-19T13:46:14Z
Lists: 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.