aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-11-15 19:29:05 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2012-11-15 19:29:05 -0500
commit1746ba92565d130c3b5c6fc285ac57f00cf6bf75 (patch)
tree1c1d4fbfe344d21a654090c16b6aa4aab65e6199 /src/backend/utils/adt/numeric.c
parent817c186ea31ca4e304a1b55540433a1287f9fb7a (diff)
downloadpostgresql-1746ba92565d130c3b5c6fc285ac57f00cf6bf75.tar.gz
postgresql-1746ba92565d130c3b5c6fc285ac57f00cf6bf75.zip
Improve check_partial_indexes() to consider join clauses in proof attempts.
Traditionally check_partial_indexes() has only looked at restriction clauses while trying to prove partial indexes usable in queries. However, join clauses can also be used in some cases; mainly, that a strict operator on "x" proves an "x IS NOT NULL" index predicate, even if the operator is in a join clause rather than a restriction clause. Adding this code fixes a regression in 9.2, because previously we would take join clauses into account when considering whether a partial index could be used in a nestloop inner indexscan path. 9.2 doesn't handle nestloop inner indexscans in the same way, and this consideration was overlooked in the rewrite. Moving the work to check_partial_indexes() is a better solution anyway, since the proof applies whether or not we actually use the index in that particular way, and we don't have to do it over again for each possible outer relation. Per report from Dave Cramer.
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions