David Rowley <dgrowle...@gmail.com> writes: > On Sat, Aug 9, 2014 at 3:34 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> There's no need for a new error message I think, because we should just >> ignore such indexes. After all, there might be a valid matching index >> later on.
> hmm, but if the user attempts to define the foreign key that contains a > duplicate column in the REFERENCES part, then we'll never "find" any > indexes, so there's no point in looking at all. OK, now that I'm a bit more awake, I agree with that. > I've attached a version of the patch that's a little smarter when it comes > to doing the duplicate checks in the attnums array... Applied with some cosmetic adjustments. I didn't bother with the regression test either --- this doesn't seem like something that needs permanent memorialization as a regression test. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers