From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Markus Bertheau <twanger(at)bluetwanger(dot)de> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, 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 14:06:47 |
Message-ID: | 41236277.5060903@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Markus Bertheau | 2004-08-18 14:28:49 | Re: multi column foreign key for implicitly unique columns |
Previous Message | Markus Bertheau | 2004-08-18 13:49:21 | Re: multi column foreign key for implicitly unique columns |