"craig perras" <craigp98072(at)yahoo(dot)com> writes:
> Domain check constraint not checked when adding new column.
Hmm. It does work for cases like
regression=# create domain posint int check (value > 0);
CREATE DOMAIN
regression=# alter table foo add column f5 posint default 0;
ERROR: value for domain posint violates check constraint "posint_check"
I think the issue is that when you don't specify any default, the scan
of the table gets optimized away.
regards, tom lane