1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

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.
This commit is contained in:
Tom Lane
2005-11-25 19:47:50 +00:00
parent dab52ab13d
commit 290166f934
12 changed files with 958 additions and 334 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.44 2005/11/22 18:17:15 momjian Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.45 2005/11/25 19:47:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -171,7 +171,7 @@ make_restrictinfo_from_bitmapqual(Path *bitmapqual,
/*
* Avoid generating one-element ORs, which could happen due to
* redundancy elimination.
* redundancy elimination or ScalarArrayOpExpr quals.
*/
if (list_length(withris) <= 1)
result = withris;