mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +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:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/selfuncs.h,v 1.25 2005/11/07 17:36:47 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/selfuncs.h,v 1.26 2005/11/25 19:47:50 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -112,6 +112,10 @@ extern Selectivity booltestsel(PlannerInfo *root, BoolTestType booltesttype,
|
||||
Node *arg, int varRelid, JoinType jointype);
|
||||
extern Selectivity nulltestsel(PlannerInfo *root, NullTestType nulltesttype,
|
||||
Node *arg, int varRelid);
|
||||
extern Selectivity scalararraysel(PlannerInfo *root,
|
||||
ScalarArrayOpExpr *clause,
|
||||
bool is_join_clause,
|
||||
int varRelid, JoinType jointype);
|
||||
|
||||
extern void mergejoinscansel(PlannerInfo *root, Node *clause,
|
||||
Selectivity *leftscan,
|
||||
|
||||
Reference in New Issue
Block a user