Re: Inherited FK Indexing

From: Markus Schiltknecht <markus(at)bluegap(dot)ch>
To: Ketema Harris <ketema(at)ketema(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Inherited FK Indexing
Date: 2007-09-14 16:23:59
Message-ID: 46EAB59F.80606@bluegap.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2007-09-14 16:44:04 Re: Tablespaces on tertiary media
Previous Message Erik Jones 2007-09-14 16:23:14 Re: Inherited FK Indexing