Re: multi column foreign key for implicitly unique columns - Mailing list pgsql-sql

From Josh Berkus
Subject Re: multi column foreign key for implicitly unique columns
Date
Msg-id 200408181155.34472.josh@agliodbs.com
Whole thread Raw
In response to Re: multi column foreign key for implicitly unique columns  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: multi column foreign key for implicitly unique columns  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-sql
Jan,
>
> If a.x is unique, then (b.x, b.y) references (a.x, a.y) is only ensuring
> that the redundant copy of y in b.y stays in sync with a.y.

So?  What's denormalized about that?  His other choice is to use a trigger.

What he's trying to do is ensure that the class selected for the FK 
class_name, field_name relates to the same class_name in objects.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: SQL Challenge: Arbitrary Cross-tab
Next
From: Bruno Wolff III
Date:
Subject: Re: multi column foreign key for implicitly unique columns