X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 02B875E46E3 for ; Wed, 18 Aug 2004 15:55:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07792-05 for ; Wed, 18 Aug 2004 18:55:12 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id B0E705E40BA for ; Wed, 18 Aug 2004 15:55:03 -0300 (ADT) Received: from [64.81.245.111] (account josh@agliodbs.com HELO temoku.sf.agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6113477; Wed, 18 Aug 2004 11:56:28 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Jan Wieck Subject: Re: multi column foreign key for implicitly unique columns Date: Wed, 18 Aug 2004 11:55:34 -0700 User-Agent: KMail/1.6.2 Cc: Tom Lane , Richard Huxton , Markus Bertheau , olly@lfix.co.uk, pgsql-sql@postgresql.org, Bruce Momjian References: <1092734724.2627.4.camel@dicaprio.akademie1.de> <1803.1092847586@sss.pgh.pa.us> <41239990.1000007@Yahoo.com> In-Reply-To: <41239990.1000007@Yahoo.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408181155.34472.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/212 X-Sequence-Number: 18709 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