Postgresql – Unique index on 3 columns where NULL conflicts with all other values in one column
I have a table like this: CREATE TABLE "users" ( id serial PRIMARY KEY, town text NOT NULL, street text not null, building text ); I want to be able to store unique entries by 3 columns "town", "street" and…