Postgresql – Foreign key to historized table
I like to store my current data along with historic data. I did the following: CREATE TABLE version ( sn serial PRIMARY KEY, id int NOT NULL, del timestamp, name text, UNIQUE NULLS NOT DISTINCT (id, del) ); sn is…