Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

Next:From: Edmund BaconDate: 2005-01-24 19:24:57
Subject: Re: BUG #1440: ecpg seg faults
Previous:From: Michael FuhrDate: 2005-01-24 19:14:37
Subject: Re: BUG #1440: ecpg seg faults

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group