Alvaro Herrera <alvherre@commandprompt.com> writes:
> The problem is that the constraint was defined with a dependence on the
> second index. I guess what you could do is drop the constraint, drop
> the second index, and then recreate the constraint. Try it within a
> transaction block, just in case it doesn't work (but I don't see why it
> wouldn't)
That's certainly the safest way, but if this is a live production
database then the time spent holding exclusive locks while
re-establishing the FK constraint may be a problem. If that's not
tolerable then the solution is manually mucking with the system
catalogs as I suggested in an earlier reply.
regards, tom lane