Re: BUG #1433: domain check constraint not checked when adding new column - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1433: domain check constraint not checked when adding new column
Date
Msg-id 23950.1106594694@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1433: domain check constraint not checked when adding new column  ("craig perras" <craigp98072@yahoo.com>)
List pgsql-bugs
"craig perras" <craigp98072@yahoo.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

pgsql-bugs by date:

Previous
From: Edmund Bacon
Date:
Subject: Re: BUG #1440: ecpg seg faults
Next
From: Tom Lane
Date:
Subject: Re: BUG #1440: ecpg seg faults