Re: [SQL] (Ab)Using schemas and inheritance - Mailing list pgsql-general

From Richard Broersma Jr
Subject Re: [SQL] (Ab)Using schemas and inheritance
Date
Msg-id 20060524174855.47650.qmail@web31807.mail.mud.yahoo.com
Whole thread Raw
In response to Re: [SQL] (Ab)Using schemas and inheritance  (Jorge Godoy <jgodoy@gmail.com>)
Responses Re: [SQL] (Ab)Using schemas and inheritance  (Jorge Godoy <jgodoy@gmail.com>)
List pgsql-general
> If I SELECT from the schema it will only retrieve data from the schema.  If I
> select from the parent table then I'll have all data available -- and for the
> parent table I might need some date index.

From what I've read I am not sure that an Index created on the base/parent table will help when
preforming select queries on data across all of the children.  If I interpret the "Caveats"
correctly I would assume that the index will only apply to data that is inserted directly into the
base/parent table.

From the Manual:

5.8.1. Caveats

...

A serious limitation of the inheritance feature is that indexes (including unique constraints) and
foreign key constraints only apply to single tables, not to their inheritance children. This is
true on both the referencing and referenced sides of a foreign key constraint.

Regards,

Richard Broersma Jr.

pgsql-general by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: PK with an expression in field list
Next
From: Jorge Godoy
Date:
Subject: Re: [SQL] (Ab)Using schemas and inheritance