Re: patch for check constraints using multiple inheritance

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: patch for check constraints using multiple inheritance
Дата
Msg-id AANLkTikkDTj9sZh4o10QWikvLd4+om-Tz6-3+vSHyniJ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: patch for check constraints using multiple inheritance  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, Jul 30, 2010 at 10:22, Robert Haas <robertmhaas@gmail.com> wrote:

> OK, it looks like level_2_parent is actually irrelevant to this issue.
>  So here's a slightly simplified test case:
>
> DROP SCHEMA IF EXISTS test_inheritance CASCADE;
> CREATE SCHEMA test_inheritance;
> SET search_path TO test_inheritance;
>
> CREATE TABLE top (i int);
> CREATE TABLE mid1 () INHERITS (top);
> CREATE TABLE mid2 () INHERITS (top);
> CREATE TABLE bottom () INHERITS (mid1, mid2);
> CREATE TABLE basement () INHERITS (bottom);
>
> ALTER TABLE top ADD CONSTRAINT a_check_constraint CHECK (i = 0);

The other problem with the current code is it creates a dump that is
not consistent with \d.  The dump gets it "right" in the sense that
basement does not have the constraint.  We could debate what
coninhcount should be, but clearly there is a bug here. [ FYI with
your patch the dump is, of course, consistent again (no
a_check_constraint) ]


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

Предыдущее
От: Jan Urbański
Дата:
Сообщение: Re: gincostestimate
Следующее
От: Robert Haas
Дата:
Сообщение: Re: reducing NUMERIC size for 9.1