Re: BUG #16465: Inconsistent results from comparison of row valueexpressions - Mailing list pgsql-bugs

From Vik Fearing
Subject Re: BUG #16465: Inconsistent results from comparison of row valueexpressions
Date
Msg-id 5270dee7-0622-3e59-9bba-0f51bd0a4660@postgresfriends.org
Whole thread Raw
In response to BUG #16465: Inconsistent results from comparison of row value expressions  (PG Bug reporting form <noreply@postgresql.org>)
List 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.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.

I concur.

The second one appears to be wrong; it should also return NULL.
-- 
Vik Fearing



pgsql-bugs by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: error
Next
From: Andrey Klychkov
Date:
Subject: Re[4]: