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

From Jan Wieck
Subject Re: multi column foreign key for implicitly unique columns
Date
Msg-id 41236277.5060903@Yahoo.com
Whole thread Raw
In response to Re: multi column foreign key for implicitly unique columns  (Markus Bertheau <twanger@bluetwanger.de>)
Responses Re: multi column foreign key for implicitly unique columns  (Markus Bertheau <twanger@bluetwanger.de>)
Re: multi column foreign key for implicitly unique columns  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: multi column foreign key for implicitly unique columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: multi column foreign key for implicitly unique columns  (Rod Taylor <pg@rbt.ca>)
List pgsql-sql
On 8/18/2004 9:49 AM, Markus Bertheau wrote:

> В Срд, 18.08.2004, в 15:33, Jan Wieck пишет:
> 
>> Meaning that not enforcing the uniqueness of those columns isn't an 
>> option.
> 
> The thing is that the columns _are_ unique, there's just no unique
> constraint on them. They are unique because there's a unique constraint
> on a subset of these columns. So no additional uniqueness enforcing
> needed.
> 

Yes, you are right, a superset of columns of a unique constraint is 
allways unique as well.

I assume it is performance why you are denormalizing your data?



However, Bruce, this should be on the TODO list:
    * Allow foreign key to reference a superset of the columns      covered by a unique constraint on the referenced
table.


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-sql by date:

Previous
From: Markus Bertheau
Date:
Subject: Re: multi column foreign key for implicitly unique columns
Next
From: Markus Bertheau
Date:
Subject: Re: multi column foreign key for implicitly unique columns