Re: Inheritance and foreign keys

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: Brendan Jurd <blakjak(at)blakjak(dot)sytes(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Inheritance and foreign keys
Date: 2003-12-09 16:30:38
Message-ID: 20031209081755.X56823@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 9 Dec 2003, Jan Wieck wrote:

> Stephan Szabo wrote:
> > On Tue, 9 Dec 2003, Brendan Jurd wrote:
> >
> > As a note, there are workarounds for foreign keys that have been mentioned
> > in the past. I'm not really sure anyone's post a real good workaround for
> > unique though.
>
> Wouldn't a central table just holding the unique key values and
> maintained by rules/triggers from all the tables in the inheritance tree
> do the trick?
>
> That central table would be the referenced one too then, because it
> contains the union of all keys.

That's the general thing for the fks and I guess the insert into the
central table should have the correct behavior in concurrent calls as
well.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Weiping He 2003-12-09 16:39:06 Re: PG and AIX
Previous Message Patrick Hatcher 2003-12-09 16:29:14 Re: Pg_Dump of schema?