Re: Indexes and Inheritance - Mailing list pgsql-general

From Tom Lane
Subject Re: Indexes and Inheritance
Date
Msg-id 21594.1165532976@sss.pgh.pa.us
Whole thread Raw
In response to Re: Indexes and Inheritance  (Erik Jones <erik@myemma.com>)
List pgsql-general
Erik Jones <erik@myemma.com> writes:
> No.  In addition, child tables do not inherit primary keys.  Think of it
> like this: if you did a \d to describe a table that you were going to
> use as a parent table in an inheritance chain, the child table would get
> everything in the table listing the columns but nothing beneath the table.

Not quite.  CHECK constraints (and NOT NULL ones too) will be inherited.

The main reason we don't yet inherit indexes/unique constraints is that
the uniqueness would only be per-table, which is not what you'd expect.
Eventually someone will think of a way to fix that ...

            regards, tom lane

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Restore database from files (not dump files)?
Next
From: Tom Lane
Date:
Subject: Re: Online index builds