Re: Inherited FK Indexing - Mailing list pgsql-general

From Markus Schiltknecht
Subject Re: Inherited FK Indexing
Date
Msg-id 46EAB59F.80606@bluegap.ch
Whole thread Raw
In response to Inherited FK Indexing  (Ketema Harris <ketema@ketema.net>)
List pgsql-general
Hi,

Ketema Harris wrote:
> as expected I can do select * from states and get everything out of the
> child table as well.  What I can't do is create a FK to the states table
> and have it look in the child table as well.  Is this on purpose?  Is it
> possible to have  FK that spans into child tables?

This is a well known (and documented, see [1]) deficiency. It's due to
the current implementation of indices, which are bound to exactly one
table, meaning they do return a position within the table, but cannot
point to different tables.

Regards

Markus

[1]: Postgres Documentation, Chapter 5.8.1 Caveats (of Inheritance):
http://www.postgresql.org/docs/8.2/static/ddl-inherit.html


pgsql-general by date:

Previous
From: Erik Jones
Date:
Subject: Re: Inherited FK Indexing
Next
From: Ron Johnson
Date:
Subject: Re: Tablespaces on tertiary media