postgresql alter table unique code example Example: postgresql update to unique ALTER TABLE foo ADD UNIQUE (thecolumn);