add constraint not null postgres with name code example Example: postgresql add not null constraint alter table users alter column email set not null;