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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Chris BSomething <xpusostomos(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Bug List <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE
Date: 2025-02-19 13:46:14
Message-ID: CAKFQuwZCdsn+atEvnWCAgdtOq96A1-YSJBquKvtKQvZJPy5Tjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wednesday, February 19, 2025, Chris BSomething <xpusostomos(at)gmail(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Greg Sabino Mullane 2025-02-19 17:48:47 Re: BUG #18817: Security Bug Report: Plaintext Password Exposure in Logs
Previous Message Chris BSomething 2025-02-19 12:50:22 Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE