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