Re: BUG #13420: Array function contains with null

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: krzysztof(dot)czajka(at)turcom(dot)pl
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13420: Array function contains with null
Date: 2015-06-09 13:50:02
Message-ID: 29941.1433857802@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

krzysztof(dot)czajka(at)turcom(dot)pl writes:
> Function contains on array with null element isn't work correctly.

> SELECT ARRAY[1,4,3] @> ARRAY[3,1]
> true

> SELECT ARRAY[ NULL ] @> ARRAY[ NULL ]
> false

> SELECT ARRAY[ NULL::varchar,'2' ] @> ARRAY[ NULL::varchar ]
> false

That looks fine to me, because NULL isn't equal to NULL.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message q 2015-06-10 02:38:21 Re: BUG #13413: pg_stat_statements don't statistics "DEALLOCATE ALL" statements
Previous Message Tom Lane 2015-06-09 13:48:40 Re: 9.5 Import foreign schema error with user defined type in schema other than public.