Inconsistencies around Composite Row nullness

Поиск
Список
Период
Сортировка
От Chris Hanks
Тема Inconsistencies around Composite Row nullness
Дата
Msg-id CAK7KUdApoBTLAEL0z+5U9Yv_o4gu6JTU9uC3_AZWSXSjm5jjGQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Inconsistencies around Composite Row nullness
Re: Inconsistencies around Composite Row nullness
Список pgsql-bugs
Hello -

I've experienced some logically inconsistent query output on my local Postgres instance, version string: PostgreSQL 18.0 (Homebrew) on aarch64-apple-darwin25.0.0, compiled by Apple clang version 17.0.0 (clang-1700.3.19.1), 64-bit 

I also reproduced it on the most recent Postgres version available at db-fiddle.com, version string: PostgreSQL 17.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2), 64-bit

This first statement resolves, reasonably, to NULL:
SELECT ROW(NULL::integer, 2) = ROW(NULL::integer, 2)

This next statement resolves to ROW(NULL, 2):
SELECT coalesce(ROW(NULL::integer, 2), ROW(1, 2))

These final two statements each resolve to true, which is inconsistent with the previous statements (each should resolve to NULL):
SELECT coalesce(ROW(NULL::integer, 2), ROW(1, 2)) = ROW(NULL::integer, 2)
SELECT coalesce(ROW(NULL::integer, 2)) = ROW(NULL::integer, 2)

Thank you!
Chris

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