Re: [SQL] (Ab)Using schemas and inheritance

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Jorge Godoy <jgodoy(at)gmail(dot)com>, Alban Hertroys <alban(at)magproductions(dot)nl>
Cc: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: [SQL] (Ab)Using schemas and inheritance
Date: 2006-05-24 17:48:55
Message-ID: 20060524174855.47650.qmail@web31807.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

> 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Godoy 2006-05-24 17:56:43 Re: [SQL] (Ab)Using schemas and inheritance
Previous Message Tino Wildenhain 2006-05-24 17:20:36 Re: PK with an expression in field list

Browse pgsql-sql by date

  From Date Subject
Next Message Jorge Godoy 2006-05-24 17:56:43 Re: [SQL] (Ab)Using schemas and inheritance
Previous Message Jorge Godoy 2006-05-24 17:10:44 Re: [SQL] (Ab)Using schemas and inheritance