From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | josh(at)agliodbs(dot)com |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Richard Huxton <dev(at)archonet(dot)com>, Markus Bertheau <twanger(at)bluetwanger(dot)de>, olly(at)lfix(dot)co(dot)uk, pgsql-sql(at)postgresql(dot)org, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Subject: | Re: multi column foreign key for implicitly unique columns |
Date: | 2004-08-18 22:33:01 |
Message-ID: | 4123D91D.8060601@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On 8/18/2004 2:55 PM, Josh Berkus wrote:
> 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.
Because the value in b.y is redundant. b.x->a.x->a.y is exactly the same
value and he even wants to ensure this with the constraint.
Jan
>
> 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.
>
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Theo Galanakis | 2004-08-19 01:10:00 | Function Issue! |
Previous Message | Theo Galanakis | 2004-08-18 22:29:13 | Re: |