I had a similar question some time ago, with an answer by Tom lane:
From: [hidden email] [mailto:[hidden email]] On Behalf Of Sahagian, DavidSent: Dienstag, 28. August 2012 15:46To: [hidden email]Subject: [GENERAL] order of checking the unique constraints
Can somebody tell me the order in which the Unique Constraints of a table are checked, like when an INSERT is done ?
It seems the the Primary is checked first, but what about the regular UCs ?