pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: darryl.dixon@gmail.com
Subject: BUG #18451: NULL fails to coerce to string when performing string comparison
Date: Tue, 30 Apr 2024 01:16:14 +0000
Message-ID: <18451-dc130ad59b7bd7c9@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18451
Logged by:          Darryl Dixon
Email address:      darryl.dixon@gmail.com
PostgreSQL version: 14.11
Operating system:   Ubuntu 22.04 64Bit
Description:        

postdb=# select where 'ab' like '%a%';
--
(1 row)

postdb=# select where 'ab'||NULL like '%a%';
--
(0 rows)

postdb=# select where 'ab'||NULL::text like '%a%';
--
(0 rows)

postdb=# select where 'ab'||format('%s', NULL::text) like '%a%';
--
(1 row)

postdb=# select version();
                                                                version     
                                                           
----------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 14.11 (Ubuntu 14.11-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
(1 row)



view thread (13+ messages)  latest in thread

Message-ID: <18451-dc130ad59b7bd7c9@postgresql.org>
Permalink:  ../18451-dc130ad59b7bd7c9@postgresql.org/
Also on:    postgresql.org/message-id/18451-dc130ad59b7bd7c9@postgresql.org

 · 

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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, darryl.dixon@gmail.com
  Subject: Re: BUG #18451: NULL fails to coerce to string when performing string comparison
  In-Reply-To: <18451-dc130ad59b7bd7c9@postgresql.org>

* 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