Can PostgreSQL use multi-column index for FK constraint validation? - Mailing list pgsql-general

From Dane Foster
Subject Can PostgreSQL use multi-column index for FK constraint validation?
Date
Msg-id CA+Wxin+5WNUWPuDaN8USakSgVFH4Ryp8YbcPmb=XCppFXNaWeQ@mail.gmail.com
Whole thread Raw
Responses Re: Can PostgreSQL use multi-column index for FK constraint validation?  (Igor Neyman <ineyman@perceptron.com>)
List pgsql-general
Hello,

If I have a primary key index of the form:
(col1, col2, col3)
and a foreign key constraint of the form:
FOREIGN KEY (col1, col2) REFERENCES foo
 ON DELETE CASCADE ON UPDATE CASCADE

should I create a separate index (col1, col2) or is PostgreSQL capable of using the primary key's index?

Thanks,

Dane

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: CoC [Final v2]
Next
From: Josh Berkus
Date:
Subject: Re: request for comment re "contributor-covenant.org"