Lets say I have a table as such:
Column | Type | Notes ---------+------------ +----------------------------------------------
PostgreSQL supports grouped unique columns, as such:
CREATE TABLE example ( a integer, b integer, c integer, UNIQUE (a, c) );
See PostgreSQL Documentation - Section 5.3.3
Easy :-)