Skip opfamily check in eclass_matches_any_index() when the index isn't a
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Sep 2008 14:56:19 +0000 (14:56 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Sep 2008 14:56:19 +0000 (14:56 +0000)
commit2b8001e54c33c8f554b3c6cebb9ad2ecdecac421
tree82664917a1ca61372993392c5188f05675c74f9c
parent841e82a03b5892e9d3a3661156efaeecbce5bf79
Skip opfamily check in eclass_matches_any_index() when the index isn't a
btree.  We can't easily tell whether clauses generated from the equivalence
class could be used with such an index, so just assume that they might be.
This bit of over-optimization prevented use of non-btree indexes for nestloop
inner indexscans, in any case where the join uses an equality operator that
is also a btree operator --- which in particular is typically true for hash
indexes.  Noted while trying to test the current hash index patch.
src/backend/optimizer/path/indxpath.c