Re: NULL handling in 1D array comparison

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Manvendra <manvendra2525(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: NULL handling in 1D array comparison
Date: 2021-05-04 16:53:27
Message-ID: 3911709.1620147207@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Manvendra <manvendra2525(at)gmail(dot)com> writes:
> Comparison should return UNKNOWN but it's returning a true.

> postgres=# select array[null]=array[null];

Yeah, that's intentional, because we have to be able to sort arrays.
Comparison of composites behaves similarly, btw.

> SQL-99 standard use to say it should come out as UNKNOWN

We're going to politely ignore the spec on this.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-05-04 23:18:48 Re: BUG #16991: regclass is not case sensitive causing "relation does not exist" error
Previous Message Manvendra 2021-05-04 16:35:06 NULL handling in 1D array comparison