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 =
It seems the following works fine in PostgreSQL 10.1.
CREATE TABLE my_table ( ... my_set int[] NOT NULL, ... ); SELECT my_set FROM my_table WHERE array_position(my_set, NULL) IS NOT NULL;