From: | Darryl Dixon <darryl(dot)dixon(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18451: NULL fails to coerce to string when performing string comparison |
Date: | 2024-04-30 22:11:58 |
Message-ID: | CAMfewD2k5aWCM6CLP2gZ2DoQtYGrApwXuAxtqdygUK8HU2gHwg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thanks Tom,
Yes, I realised after sending that that is what's going on.
The documentation Note on the PostgreSQL behavior got my brain running in
the wrong direction initially and the confusion was downstream from that.
regards,
Darryl Dixon
On Wed, 1 May 2024 at 10:07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Darryl Dixon <darryl(dot)dixon(at)gmail(dot)com> writes:
> > The bug is that:
> > 1) The concatenation is not producing NULL, but rather Text, and yet the
> > comparison fails regardless, and
> > 2) The explicit CAST of NULL -> Text fails to remedy this.
>
> I wonder what you think NULL means. You certainly don't appear to
> understand its semantics at all. Every SQL data type allows NULL
> as a value, so "casting NULL to text" doesn't change the value,
> only what type the parser deems it to have.
>
> > Further examples below:
>
> Every one of these looks as-expected to me.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-04-30 22:30:46 | Re: BUG #18451: NULL fails to coerce to string when performing string comparison |
Previous Message | David G. Johnston | 2024-04-30 22:09:06 | Re: BUG #18451: NULL fails to coerce to string when performing string comparison |