get_constraint_index() does its work by going through pg_depend. It was
added before pg_constraint.conindid was added, and some callers are
still not changed. Are there reasons for that? Probably not. The
attached patch changes get_constraint_index() to an lsyscache-style
lookup instead.
The nearby get_index_constraint() should probably also be changed to
scan pg_constraint instead of pg_depend, but that doesn't have a
syscache to use, so it would be a different approach, so I figured I'd
ask about get_constraint_index() first.