From: | Vik Fearing <vik(at)postgresfriends(dot)org> |
---|---|
To: | lukas(dot)eder(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, PG Bug reporting form <noreply(at)postgresql(dot)org> |
Subject: | Re: BUG #16465: Inconsistent results from comparison of row value expressions |
Date: | 2020-05-27 09:14:13 |
Message-ID: | 5270dee7-0622-3e59-9bba-0f51bd0a4660@postgresfriends.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 5/27/20 10:00 AM, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 16465
> Logged by: Lukas Eder
> Email address: lukas(dot)eder(at)gmail(dot)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.
I concur.
The second one appears to be wrong; it should also return NULL.
--
Vik Fearing
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey Klychkov | 2020-05-27 12:10:18 | Re[4]: |
Previous Message | Daniel Gustafsson | 2020-05-27 08:00:50 | Re: error |