BUG #18451: NULL fails to coerce to string when performing string comparison

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #18451: NULL fails to coerce to string when performing string comparison
Дата
Msg-id 18451-dc130ad59b7bd7c9@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #18451: NULL fails to coerce to string when performing string comparison  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: BUG #18451: NULL fails to coerce to string when performing string comparison  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-bugs
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)


В списке pgsql-bugs по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Re: edb installation failed for pgadmin when username is Chinese under c;\user #7432