From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Chris Fischer" <Chris(dot)Fischer(at)channeladvisor(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Problem identifying constraints which should not be inherited |
Date: | 2007-04-12 20:11:41 |
Message-ID: | 4698.1176408701@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
"Chris Fischer" <Chris(dot)Fischer(at)channeladvisor(dot)com> writes:
> alter table only t1 add constraint ck_col1 check (number <> 0);
The bug here is that we allow that. Continuing your example,
regression=# insert into t2 values(0);
INSERT 0 1
regression=# select * from t1;
col1
------
0
(1 row)
which sure looks to me like a violation of the principle of least
surprise.
This has come up before and I think the consensus was to disallow
non-inherited check constraints; not sure why it hasn't been done yet.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Kaltenbrunner | 2007-04-13 08:41:10 | BUG #3223: Testbugreport for new wwwmaster |
Previous Message | Chris Fischer | 2007-04-12 19:17:02 | Problem identifying constraints which should not be inherited |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-04-12 20:24:47 | Re: Do we still need "log_invalid_page"? |
Previous Message | Tom Lane | 2007-04-12 19:56:58 | Re: [PATCHES] Reviewers Guide to Deferred Transactions/Transaction Guarantee |