diff options
| author | Tom Lane | 2008-04-13 20:51:21 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-04-13 20:51:21 +0000 |
| commit | 226837e57eb6092b160e7272e7d09a3748c0eb47 (patch) | |
| tree | 9d69fdeed5f89838191d2ba223e0d7a920bd4797 /src/include | |
| parent | 24558da14a26337e945732d3b435b07edcbb6733 (diff) | |
Since createplan.c no longer cares whether index operators are lossy, it has
no particular need to do get_op_opfamily_properties() while building an
indexscan plan. Postpone that lookup until executor start. This simplifies
createplan.c a lot more than it complicates nodeIndexscan.c, and makes things
more uniform since we already had to do it that way for RowCompare
expressions. Should be a bit faster too, at least for plans that aren't
re-used many times, since we avoid palloc'ing and perhaps copying the
intermediate list data structure.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/executor/nodeIndexscan.h | 5 | ||||
| -rw-r--r-- | src/include/nodes/plannodes.h | 10 | ||||
| -rw-r--r-- | src/include/utils/lsyscache.h | 5 |
3 files changed, 5 insertions, 15 deletions
diff --git a/src/include/executor/nodeIndexscan.h b/src/include/executor/nodeIndexscan.h index 27f4f6c9ac..674c457234 100644 --- a/src/include/executor/nodeIndexscan.h +++ b/src/include/executor/nodeIndexscan.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/nodeIndexscan.h,v 1.31 2008/01/01 19:45:57 momjian Exp $ + * $PostgreSQL: pgsql/src/include/executor/nodeIndexscan.h,v 1.32 2008/04/13 20:51:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -26,8 +26,7 @@ extern void ExecIndexReScan(IndexScanState *node, ExprContext *exprCtxt); /* routines exported to share code with nodeBitmapIndexscan.c */ extern void ExecIndexBuildScanKeys(PlanState *planstate, Relation index, - List *quals, List *strategies, List *subtypes, - ScanKey *scanKeys, int *numScanKeys, + List *quals, ScanKey *scanKeys, int *numScanKeys, IndexRuntimeKeyInfo **runtimeKeys, int *numRuntimeKeys, IndexArrayKeyInfo **arrayKeys, int *numArrayKeys); extern void ExecIndexEvalRuntimeKeys(ExprContext *econtext, diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index e0deee3afc..6fb93e810d 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/plannodes.h,v 1.99 2008/01/01 19:45:58 momjian Exp $ + * $PostgreSQL: pgsql/src/include/nodes/plannodes.h,v 1.100 2008/04/13 20:51:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -241,10 +241,6 @@ typedef Scan SeqScan; * table). This is a bit hokey ... would be cleaner to use a special-purpose * node type that could not be mistaken for a regular Var. But it will do * for now. - * - * indexstrategy and indexsubtype are lists corresponding one-to-one with - * indexqual; they give information about the indexable operators that appear - * at the top of each indexqual. * ---------------- */ typedef struct IndexScan @@ -253,8 +249,6 @@ typedef struct IndexScan Oid indexid; /* OID of index to scan */ List *indexqual; /* list of index quals (OpExprs) */ List *indexqualorig; /* the same in original form */ - List *indexstrategy; /* integer list of strategy numbers */ - List *indexsubtype; /* OID list of strategy subtypes */ ScanDirection indexorderdir; /* forward or backward or don't care */ } IndexScan; @@ -281,8 +275,6 @@ typedef struct BitmapIndexScan Oid indexid; /* OID of index to scan */ List *indexqual; /* list of index quals (OpExprs) */ List *indexqualorig; /* the same in original form */ - List *indexstrategy; /* integer list of strategy numbers */ - List *indexsubtype; /* OID list of strategy subtypes */ } BitmapIndexScan; /* ---------------- diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 3abbaf830f..b1d5648e46 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.122 2008/01/01 19:45:59 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.123 2008/04/13 20:51:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -31,8 +31,7 @@ extern int get_op_opfamily_strategy(Oid opno, Oid opfamily); extern void get_op_opfamily_properties(Oid opno, Oid opfamily, int *strategy, Oid *lefttype, - Oid *righttype, - bool *recheck); + Oid *righttype); extern Oid get_opfamily_member(Oid opfamily, Oid lefttype, Oid righttype, int16 strategy); extern bool get_ordering_op_properties(Oid opno, |
