Teach planner and executor to handle ScalarArrayOpExpr as an indexable

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 290166f93404d8759f4bf60ef1732c8ba9a52785
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-11-25T19:47:50Z
Releases: 8.2.0
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.

Files