How do I determine if NULL is contained in an array in Postgres? Currently using Postgres 9.3.3.
If I test with the following select it returns contains_null =
contains_null =
select exists ( select 1 from unnest(array[1, null]) s(a) where a is null ); exists -------- t
Or shorter:
select bool_or(a is null) from unnest(array[1, null]) s(a) ; bool_or --------- t