PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16465
PG Version12.2
OSDebian 12.2-2.pgdg100+1 (Docker)
Opened2020-05-27 08:00:46+00
Reported byLukas Eder
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16465
Logged by:          Lukas Eder
Email address:      (redacted)
PostgreSQL version: 12.2
Operating system:   Debian 12.2-2.pgdg100+1 (Docker)
Description:        

Consider this query:

---------------------------------------------------
SELECT (1, NULL::INT) = (1, NULL::INT), A = B
FROM (SELECT (1, NULL::INT) A, (1, NULL::INT) B) T;
---------------------------------------------------

The result is:

?column?|?column?|
--------|--------|
        |true    |

It seems the comparison of row value expressions with respect to NULLs is
inconsistent depending on whether the expressions are compared directly
(first column), or indirectly from derived tables (second column). My
reading of the SQL standard is that the second one is incorrect.

Messages

DateAuthorSubject
2020-05-27 08:00:46+00PG Bug reporting formBUG #16465: Inconsistent results from comparison of row value expressions
2020-05-27 09:14:13+00Vik FearingRe: BUG #16465: Inconsistent results from comparison of row value expressions
2020-05-27 12:16:55+00Tom LaneRe: BUG #16465: Inconsistent results from comparison of row value expressions