]> granicus.if.org Git - postgresql/commit
Teach planner and executor to handle ScalarArrayOpExpr as an indexable
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Nov 2005 19:47:50 +0000 (19:47 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Nov 2005 19:47:50 +0000 (19:47 +0000)
commit290166f93404d8759f4bf60ef1732c8ba9a52785
treeb7b9b00e3b3c1defea0e78b4f9b982e21963aa0f
parentdab52ab13d3d3cce26e9bcc3193eb285c195d430
Teach planner and executor to handle ScalarArrayOpExpr as an indexable
qualification when the underlying operator is indexable and useOr is true.
That is, indexkey op ANY (ARRAY[...]) is effectively translated into an
OR combination of one indexscan for each array element.  This only works
for bitmap index scans, of course, since regular indexscans no longer
support OR'ing of scans.  There are still some loose ends to clean up
before changing 'x IN (list)' to translate as a ScalarArrayOpExpr;
for instance predtest.c ought to be taught about it.  But this gets the
basic functionality in place.
12 files changed:
src/backend/executor/nodeBitmapIndexscan.c
src/backend/executor/nodeIndexscan.c
src/backend/optimizer/path/clausesel.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planagg.c
src/backend/optimizer/util/restrictinfo.c
src/backend/utils/adt/selfuncs.c
src/include/executor/nodeIndexscan.h
src/include/nodes/execnodes.h
src/include/optimizer/paths.h
src/include/utils/selfuncs.h