Last Updated: February 25, 2016
·
1.342K
· sbfaulkner

PostgreSQL multiple column UNIQUE constraints with NULLs are not UNIQUE

In PostgreSQL, when you define a uniqueness constraint on a set of columns, a NULL value in one or more of those columns is NOT considered to be duplicate/equal (thereby allowing duplicate values in the non-NULL columns).

This is per the SQL standard, however, is not true in all databases.