Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> I'm thinking that maybe we can do the strip-the-outer-joins work only
> when it's not the top JoinDomain. When we are in the top JoinDomain, it
> seems to me that it's safe to push the qual to the top of the tree.
Yeah, because there's nothing to commute with. Might as well do that
for consistency with the distribute_qual_to_rels behavior, although
I felt it was better to put it inside get_join_domain_min_rels.
Pushed, thanks for the report!
regards, tom lane