Added to TODO:

>       o Require all CHECK constraints to be inherited
>
>         http://archives.postgresql.org/pgsql-bugs/2007-04/msg00026.php


---------------------------------------------------------------------------

Tom Lane wrote:
> "Chris Fischer" <[EMAIL PROTECTED]> 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
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to