From: Josh Berkus <josh@agliodbs.com>
To: Jan Wieck <JanWieck@Yahoo.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Richard Huxton <dev@archonet.com>
Cc: Markus Bertheau <twanger@bluetwanger.de>
Cc: olly@lfix.co.uk, pgsql-sql@postgresql.org, Bruce Momjian <pgman@candle.pha.pa.us>
Subject: Re: multi column foreign key for implicitly unique columns
Date: Wed, 18 Aug 2004 11:55:34 -0700
Message-ID: <200408181155.34472.josh@agliodbs.com> (raw)
In-Reply-To: <41239990.1000007@Yahoo.com>
References: <1092734724.2627.4.camel@dicaprio.akademie1.de>
<1803.1092847586@sss.pgh.pa.us>
<41239990.1000007@Yahoo.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, JanWieck@Yahoo.com, tgl@sss.pgh.pa.us, dev@archonet.com, twanger@bluetwanger.de, pgman@candle.pha.pa.us
Subject: Re: multi column foreign key for implicitly unique columns
In-Reply-To: <200408181155.34472.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox