Re: Inheritance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inheritance
Дата
Msg-id 17952.1029370811@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Inheritance  (Curt Sampson <cjs@cynic.net>)
Ответы Re: Inheritance
Список pgsql-hackers
Curt Sampson <cjs@cynic.net> writes:
> That's my biggest fear as well. Here are a couple of possible
> assertions we could make about supertables and subtables that have,
> I think, some fairly far-reaching implications.

CHECK-style constraints don't seem like a huge issue to me.  We already
have recursive ALTER TABLE ADD CONSTRAINT, and IIRC we do actually
arrange for CHECK constraints on a parent to be inherited when a child
is created.  We could argue about whether, for example, non-recursive
ADD CONSTRAINT should be disallowed or not --- but that's not any kind
of implementation showstopper, just a definitional issue about
flexibility vs. safety.

It's nonlocal constraints that are the problem, and here foreign keys
and UNIQUE constraints are certainly the canonical examples.  Both of
these would be largely solved with table-spanning indexes I think.

What I'm not sure about is what other gotchas may be lurking...
        regards, tom lane


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

Предыдущее
От: Curt Sampson
Дата:
Сообщение: Re: Inheritance
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Open 7.3 items