Я изобразил его из документов PostgreSQL, точный синтаксис:
ALTER TABLE the_table ADD CONSTRAINT constraint_name UNIQUE (thecolumn);
Спасибо Fred.