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