How to allow only one row for a table?
A UNIQUE constraint allows multiple rows with null values, because two null values are not considered to be the same. (Except when using NULLS NOT DISTINCT in Postgres 15 or later.) Similar considerations apply to CHECK constraints. They allow the expression to be true or null (just not false). Again, null values get past the … Read more