From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: lukas.eder@gmail.com
Subject: BUG #16465: Inconsistent results from comparison of row value expressions
Date: Wed, 27 May 2020 08:00:46 +0000
Message-ID: <16465-0ec89f0382fd00db@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16465
Logged by: Lukas Eder
Email address: lukas.eder@gmail.com
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.
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, lukas.eder@gmail.com
Subject: Re: BUG #16465: Inconsistent results from comparison of row value expressions
In-Reply-To: <16465-0ec89f0382fd00db@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