Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> It occurred to me that we can skip the new get_relids_in_jointree()
> scan altogether when there are no PHVs anywhere in the query
> (root->glob->lastPHId==0), since then the find_dependent_phvs() checks
> are no-ops anyway. This is also consistent with how we check
> root->glob->lastPHId in find_dependent_phvs() and
> find_dependent_phvs_in_jointree(). Attached is a trivial patch doing
> that.
WFM.
regards, tom lane