Re: BUG #1433: domain check constraint not checked when adding new column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "craig perras" <craigp98072(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1433: domain check constraint not checked when adding new column
Date: 2005-01-24 19:24:54
Message-ID: 23950.1106594694@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Edmund Bacon 2005-01-24 19:24:57 Re: BUG #1440: ecpg seg faults
Previous Message Michael Fuhr 2005-01-24 19:14:37 Re: BUG #1440: ecpg seg faults