Re: Indexes and Inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Jones <erik(at)myemma(dot)com>
Cc: Keary Suska <hierophant(at)pcisys(dot)net>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Indexes and Inheritance
Date: 2006-12-07 23:09:36
Message-ID: 21594.1165532976@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erik Jones <erik(at)myemma(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-12-07 23:11:02 Re: Online index builds
Previous Message Scott Marlowe 2006-12-07 23:06:05 Re: Restore database from files (not dump files)?