NULL handling in 1D array comparison

From: Manvendra <manvendra2525(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: NULL handling in 1D array comparison
Date: 2021-05-04 16:35:06
Message-ID: CA+L9vQUEdb0zTsTNngbvZc+_p0qrHEGm5Wu7079bSkixGVUVtQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

postgres=# select version();
version
---------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 13.0 (Ubuntu 13.0-1.pgdg18.04+1) on x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
(1 row)

Comparison should return UNKNOWN but it's returning a true.

postgres=# select array[null]=array[null];
?column?
----------
t
(1 row)

postgres=# select array[1, null]=array[1, null];
?column?
----------
t
(1 row)

SQL-99 standard use to say it should come out as UNKNOWN
https://crate.io/docs/sql-99/en/latest/chapters/10.html#comparison

Thanks & Regards,
Manvendra Panwar
Email - manvendra2525(at)gmail(dot)com

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-05-04 16:53:27 Re: NULL handling in 1D array comparison
Previous Message Alvaro Herrera 2021-05-04 16:26:53 Re: ALTER CONSTRAINT on a partitioned FK isn't working