| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Jan Wieck <JanWieck(at)Yahoo(dot)com>, Markus Bertheau <twanger(at)bluetwanger(dot)de>, 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 16:02:42 |
| Message-ID: | 41237DA2.9090405@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Tom Lane wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
>
>>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.
>
>
> See the followup discussion as to why this is a bad idea.
Maybe an alternative todo?
* Allow multiple unique constraints to share an index where one is a
superset of the others' columns.
That way you can mark it unique without having the overhead of multiple
indexes.
--
Richard Huxton
Archonet Ltd
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chris Travers | 2004-08-18 16:11:46 | Re: SQL Challenge: Arbitrary Cross-tab |
| Previous Message | Rod Taylor | 2004-08-18 15:45:03 | Re: multi column foreign key for implicitly unique columns |