aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-11-25 19:47:50 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-11-25 19:47:50 +0000
commit290166f93404d8759f4bf60ef1732c8ba9a52785 (patch)
treeb7b9b00e3b3c1defea0e78b4f9b982e21963aa0f /src/include/executor
parentdab52ab13d3d3cce26e9bcc3193eb285c195d430 (diff)
downloadpostgresql-290166f93404d8759f4bf60ef1732c8ba9a52785.tar.gz
postgresql-290166f93404d8759f4bf60ef1732c8ba9a52785.zip
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.
Diffstat (limited to 'src/include/executor')
-rw-r--r--src/include/executor/nodeIndexscan.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/include/executor/nodeIndexscan.h b/src/include/executor/nodeIndexscan.h
index 7f280c892e1..21bb254f63e 100644
--- a/src/include/executor/nodeIndexscan.h
+++ b/src/include/executor/nodeIndexscan.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/executor/nodeIndexscan.h,v 1.24 2005/10/15 02:49:44 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/executor/nodeIndexscan.h,v 1.25 2005/11/25 19:47:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,13 +25,15 @@ extern void ExecIndexRestrPos(IndexScanState *node);
extern void ExecIndexReScan(IndexScanState *node, ExprContext *exprCtxt);
/* routines exported to share code with nodeBitmapIndexscan.c */
-extern bool ExecIndexBuildScanKeys(PlanState *planstate, List *quals,
+extern void ExecIndexBuildScanKeys(PlanState *planstate, List *quals,
List *strategies, List *subtypes,
- ExprState ***runtimeKeyInfo,
- ScanKey *scanKeys, int *numScanKeys);
+ ScanKey *scanKeys, int *numScanKeys,
+ IndexRuntimeKeyInfo **runtimeKeys, int *numRuntimeKeys,
+ IndexArrayKeyInfo **arrayKeys, int *numArrayKeys);
extern void ExecIndexEvalRuntimeKeys(ExprContext *econtext,
- ExprState **run_keys,
- ScanKey scan_keys,
- int n_keys);
+ IndexRuntimeKeyInfo *runtimeKeys, int numRuntimeKeys);
+extern bool ExecIndexEvalArrayKeys(ExprContext *econtext,
+ IndexArrayKeyInfo *arrayKeys, int numArrayKeys);
+extern bool ExecIndexAdvanceArrayKeys(IndexArrayKeyInfo *arrayKeys, int numArrayKeys);
#endif /* NODEINDEXSCAN_H */