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

From Tom Lane
Subject Re: Multicolumn foreign keys need useless unique indices?
Date
Msg-id 26846.1032016463@sss.pgh.pa.us
Whole thread Raw
In response to Re: Multicolumn foreign keys need useless unique indices?  (Hannu Krosing <hannu@tm.ee>)
Responses Re: Multicolumn foreign keys need useless unique indices?
List pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
> If we have unique index on t.i and we define additional unique
> constraint on (t.i, t.j), then we don't need the extra unique index to
> be created - the index on t.i is enough to quarantee the uniqueness of
> (t.i,t.j) or any set of columns that includes t.i.

You missed the point: we are concerned about existence of a row, not only
uniqueness.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: DROP TABLE... CASCADE weirdness
Next
From: Tom Lane
Date:
Subject: Re: time default