Re: Multicolumn foreign keys need useless unique indices? - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Multicolumn foreign keys need useless unique indices?
Date
Msg-id GNELIHDDFBOCMGBFGEFOEEDNCEAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Multicolumn foreign keys need useless unique indices?  (Antti Haapala <antti.haapala@iki.fi>)
Responses Re: Multicolumn foreign keys need useless unique indices?  (Antti Haapala <antti.haapala@iki.fi>)
Re: Multicolumn foreign keys need useless unique indices?  (Rod Taylor <rbt@rbt.ca>)
List pgsql-hackers
> 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?

Chris



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: TOAST docs
Next
From: Hannu Krosing
Date:
Subject: Re: fixpoint