pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Darryl Dixon <darryl.dixon@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18451: NULL fails to coerce to string when performing string comparison
Date: Tue, 30 Apr 2024 18:07:01 -0400
Message-ID: <1822025.1714514821@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMfewD3sqAr4eD25NZJvSnAp406+r6cVer-3=5HoQ1Nm0Wt6FA@mail.gmail.com>
References: <18451-dc130ad59b7bd7c9@postgresql.org>
	<CAApHDvqRG-cd92D2YV8+C3wLAT0_1ut=X4yX0DetGQ+gGAhtRA@mail.gmail.com>
	<CAMfewD3sqAr4eD25NZJvSnAp406+r6cVer-3=5HoQ1Nm0Wt6FA@mail.gmail.com>

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





view thread (13+ messages)  latest in thread

Message-ID: <1822025.1714514821@sss.pgh.pa.us>
Permalink:  ../1822025.1714514821@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1822025.1714514821@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, darryl.dixon@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18451: NULL fails to coerce to string when performing string comparison
  In-Reply-To: <1822025.1714514821@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox