On Wed, 1 May 2024 at 09:06, PG Bug reporting form
<noreply@postgresql.org> wrote:
> postdb=# select where 'ab'||NULL like '%a%';
> --
> (0 rows)
>
> postdb=# select where 'ab'||NULL::text like '%a%';
> --
> (0 rows)
You've not mentioned where you think the bug is, but if you think it's
in either of the above, PostgreSQL is following the SQL standard here.
The SQL2016 copy I have here says:
"6.31 <string value expression>
If at least one of S1 and S2 is the null value, then the result of the
<concatenation> is the null value."
There are a few RDBMSs that are lax on this rule, perhaps you're here
because PostgreSQL isn't doing what you're used to?
David