Re: Inheritance and foreign keys - Mailing list pgsql-general

From Jan Wieck
Subject Re: Inheritance and foreign keys
Date
Msg-id 3FD5EEE1.10107@Yahoo.com
Whole thread Raw
In response to Re: Inheritance and foreign keys  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
Stephan Szabo wrote:

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

I'm not 100% sure though. Is there any possibility that an entry in a
table hides an entry in an inherited one?


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: PG and AIX
Next
From: Erwin Brandstetter
Date:
Subject: PSQL 7.4 on debian woody