Re: Inheritance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inheritance
Date
Msg-id 17952.1029370811@sss.pgh.pa.us
Whole thread Raw
In response to Re: Inheritance  (Curt Sampson <cjs@cynic.net>)
Responses Re: Inheritance
List 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 by date:

Previous
From: Curt Sampson
Date:
Subject: Re: Inheritance
Next
From: Bruce Momjian
Date:
Subject: Re: Open 7.3 items