diff options
Diffstat (limited to 'src/backend/executor/nodeIndexscan.c')
-rw-r--r-- | src/backend/executor/nodeIndexscan.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 9773f2341ec..4371fc1a280 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeIndexscan.c,v 1.117 2006/10/04 00:29:52 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeIndexscan.c,v 1.118 2006/12/23 00:43:09 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -797,9 +797,10 @@ ExecIndexBuildScanKeys(PlanState *planstate, Relation index, int flags = SK_ROW_MEMBER; Datum scanvalue; Oid opno; - Oid opclass; + Oid opfamily; int op_strategy; - Oid op_subtype; + Oid op_lefttype; + Oid op_righttype; bool op_recheck; /* @@ -857,15 +858,21 @@ ExecIndexBuildScanKeys(PlanState *planstate, Relation index, if (index->rd_rel->relam != BTREE_AM_OID || varattno < 1 || varattno > index->rd_index->indnatts) elog(ERROR, "bogus RowCompare index qualification"); - opclass = index->rd_indclass->values[varattno - 1]; + opfamily = index->rd_opfamily[varattno - 1]; - get_op_opclass_properties(opno, opclass, - &op_strategy, &op_subtype, &op_recheck); + get_op_opfamily_properties(opno, opfamily, + &op_strategy, + &op_lefttype, + &op_righttype, + &op_recheck); if (op_strategy != rc->rctype) elog(ERROR, "RowCompare index qualification contains wrong operator"); - opfuncid = get_opclass_proc(opclass, op_subtype, BTORDER_PROC); + opfuncid = get_opfamily_proc(opfamily, + op_lefttype, + op_righttype, + BTORDER_PROC); /* * initialize the subsidiary scan key's fields appropriately @@ -874,7 +881,7 @@ ExecIndexBuildScanKeys(PlanState *planstate, Relation index, flags, varattno, /* attribute number */ op_strategy, /* op's strategy */ - op_subtype, /* strategy subtype */ + op_righttype, /* strategy subtype */ opfuncid, /* reg proc to use */ scanvalue); /* constant */ extra_scan_keys++; |