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