Re: BUG #18451: NULL fails to coerce to string when performing string comparison - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18451: NULL fails to coerce to string when performing string comparison
Date
Msg-id 1822025.1714514821@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18451: NULL fails to coerce to string when performing string comparison  (Darryl Dixon <darryl.dixon@gmail.com>)
Responses Re: BUG #18451: NULL fails to coerce to string when performing string comparison
List pgsql-bugs
Darryl Dixon <darryl.dixon@gmail.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



pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: BUG #18452: [PostgreSQL and 16.1]: [Postgres.exe crash observed while installing the application]
Next
From: David Rowley
Date:
Subject: Re: BUG #18451: NULL fails to coerce to string when performing string comparison