//psql's inline help: $ h ALTER TABLE ALTER TABLE tablename ADD CONSTRAINT constraintname UNIQUE (columns);
CREATE TABLE someTable ( id serial PRIMARY KEY, col1 int NOT NULL, col2 int NOT NULL, UNIQUE (col1, col2) )