can an int be null postgresql? code example
Example 1: postgresql add not null constraint
alter table users alter column email set not null;
Example 2: postgresql if null then 0
select coalesce(avg(bar), 0) from foo;
alter table users alter column email set not null;
select coalesce(avg(bar), 0) from foo;