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