Re: Multicolumn foreign keys need useless unique indices?

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Multicolumn foreign keys need useless unique indices?
Дата
Msg-id 1031916438.15720.10.camel@jester
обсуждение исходный текст
Ответ на Re: Multicolumn foreign keys need useless unique indices?  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: Multicolumn foreign keys need useless unique indices?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 2002-09-13 at 04:27, Christopher Kings-Lynne wrote:
> > AFAIK, the extra index only slows down my inserts - it basically contains
> > no usable information...
> 
> Not 100% true.  It will speed up cascade delete and update...
> 
> > shouldn't the presence of _primary_key_ in
> > multicol foreign key be enough to decide whether the whole key is unique
> > or not?
> 
> Hmmm - thinking about it, I don't see why postgres would need the entire
> thing to be unique...can't think of a reason at the moment.  Stephen?

If it's not all unique, you cannot be guaranteed there is a single row
with those values in the referenced table.

--  Rod Taylor



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

Предыдущее
От: "Shridhar Daithankar"
Дата:
Сообщение: [OT]Physical sites handling large data
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Multicolumn foreign keys need useless unique indices?