Fix bug introduced into indexable_outerrelids() by an ill-considered
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Sep 2005 23:25:07 +0000 (23:25 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Sep 2005 23:25:07 +0000 (23:25 +0000)
commit4da49d4970085924a761f0a42353aa6f72cb51bb
tree8e72fa8b310f45ebc7205055cf4743d7f72039f5
parent1cfc662b10320f38b102bc7cf10357e0a4559796
Fix bug introduced into indexable_outerrelids() by an ill-considered
"optimization".  When we find a potentially useful joinclause, we
have to add all its other required_relids to the result, not only the
other clause_relids.  They are different in the case of a joinclause
whose applicability has to be postponed due to outer join.  We have
to include the extra rels because otherwise, after best_inner_indexscan
masks the join rels with index_outer_relids, it will always fail to
find the joinclause as applicable.  Per report from Husam Tomeh.
src/backend/optimizer/path/indxpath.c