Re: Problem identifying constraints which should not be inherited

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Problem identifying constraints which should not be inherited
Дата
Msg-id 200803070107.m27177O15696@momjian.us
обсуждение исходный текст
Ответ на Re: Problem identifying constraints which should not be inherited  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Problem identifying constraints which should not be inherited  (NikhilS <nikkhils@gmail.com>)
Список pgsql-bugs
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" <Chris.Fischer@channeladvisor.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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key
Следующее
От: "ykhuang"
Дата:
Сообщение: Error during hash index scans can cause postgres halt!