This is the sample table
create table usuario(
id serial primary key not null,
nome varchar(100),
email varchar(100),
login varchar(100),
senha varchar(100),
tipo varchar(50),
status varchar(30)
)
I used this code, but it did not work
alter table usuario add constraint unique_login unique(login)