Re: multi column foreign key for implicitly unique columns

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: multi column foreign key for implicitly unique columns
Дата
Msg-id 41237DA2.9090405@archonet.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  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Tom Lane wrote:
> Jan Wieck <JanWieck@Yahoo.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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: multi column foreign key for implicitly unique columns
Следующее
От: Chris Travers
Дата:
Сообщение: Re: SQL Challenge: Arbitrary Cross-tab