David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> Attached is a delta patch between version 1.2 and 1.3, and also a
> completely updated patch.
Just to note that I've started looking at this, and I've detected a rather
significant omission: there's no check that the join operator has anything
to do with the subquery's grouping operator. I think we need to verify
that they are members of the same opclass, as
relation_has_unique_index_for does.
regards, tom lane