Re: Table inheritance foreign key problem - Mailing list pgsql-general

From David Fetter
Subject Re: Table inheritance foreign key problem
Date
Msg-id 20101222172053.GB16815@fetter.org
Whole thread Raw
In response to Table inheritance foreign key problem  ("Andy Chambers" <achambers@mcna.net>)
List pgsql-general
On Wed, Dec 22, 2010 at 12:32:44AM -0500, Andy Chambers wrote:
> Hi,
>
> One of the caveats described in the documentation for table
> inheritance is that foreign key constraints cannot cover the case
> where you want to check that a value is found somewhere in a table
> or in that table's descendants.  It says there is no "good"
> workaround for this.

For some values of, "good," there actually is.

http://people.planetpostgresql.org/dfetter/index.php?/archives/51-Partitioning-Is-Such-Sweet-Sorrow.html
http://people.planetpostgresql.org/dfetter/index.php?/archives/59-Partitioning-Glances.html

Cheers,
David (hoping PostgreSQL will be able to infer how to automate this some day).
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: could not open relation...No such file or directory
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Cannot unsubscribe