When creating a table in PostgreSQL, default constraint names will assigned if not provided:
CREATE TABLE example ( a integer, b integer, UNIQUE
The manual is pretty clear about this ("tableconstraint: This form adds a new constraint to a table using the same syntax as CREATE TABLE.")
So you can simply run:
ALTER TABLE example ADD UNIQUE (a, b);