Commit 024d5f74 authored by Bruce Momjian's avatar Bruce Momjian

index strategy cleanup

parent f22c6f92
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.22 1998/08/10 14:32:44 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.23 1998/08/11 19:32:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -148,10 +148,7 @@ StrategyTermIsValid(StrategyTerm term, ...@@ -148,10 +148,7 @@ StrategyTermIsValid(StrategyTerm term,
{ {
if (!StrategyOperatorIsValid(&term->operatorData[index], if (!StrategyOperatorIsValid(&term->operatorData[index],
maxStrategy)) maxStrategy))
{
return false; return false;
}
} }
return true; return true;
...@@ -574,8 +571,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy, ...@@ -574,8 +571,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
break; break;
} }
operatorClassObjectId[attributeIndex] operatorClassObjectId[attributeIndex] = iform->indclass[attributeIndex];
= iform->indclass[attributeIndex];
} }
heap_endscan(scan); heap_endscan(scan);
...@@ -592,14 +588,11 @@ IndexSupportInitialize(IndexStrategy indexStrategy, ...@@ -592,14 +588,11 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
ScanKeyEntryInitialize(&entry[1], 0, Anum_pg_amproc_amopclaid, ScanKeyEntryInitialize(&entry[1], 0, Anum_pg_amproc_amopclaid,
F_OIDEQ, 0); F_OIDEQ, 0);
/* relation = heap_openr(Name_pg_amproc); */
relation = heap_openr(AccessMethodProcedureRelationName); relation = heap_openr(AccessMethodProcedureRelationName);
for (attributeNumber = maxAttributeNumber; attributeNumber > 0; for (attributeNumber = maxAttributeNumber; attributeNumber > 0;
attributeNumber--) attributeNumber--)
{ {
int16 support; int16 support;
Form_pg_amproc form; Form_pg_amproc form;
RegProcedure *loc; RegProcedure *loc;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.27 1998/08/10 04:49:37 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.28 1998/08/11 19:32:37 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -953,11 +953,10 @@ clause_pred_clause_test(Expr *predicate, Node *clause) ...@@ -953,11 +953,10 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
/* /*
* 1. Find a "btree" strategy number for the pred_op * 1. Find a "btree" strategy number for the pred_op
*/ */
/* XXX - hardcoded amopid value 403 to find "btree" operator classes */
ScanKeyEntryInitialize(&entry[0], 0, ScanKeyEntryInitialize(&entry[0], 0,
Anum_pg_amop_amopid, Anum_pg_amop_amopid,
F_OIDEQ, F_OIDEQ,
ObjectIdGetDatum(403)); ObjectIdGetDatum(BTREE_AM_OID));
ScanKeyEntryInitialize(&entry[1], 0, ScanKeyEntryInitialize(&entry[1], 0,
Anum_pg_amop_amopopr, Anum_pg_amop_amopopr,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: strat.h,v 1.9 1998/02/26 04:40:28 momjian Exp $ * $Id: strat.h,v 1.10 1998/08/11 19:32:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -74,11 +74,7 @@ typedef StrategyEvaluationData *StrategyEvaluation; ...@@ -74,11 +74,7 @@ typedef StrategyEvaluationData *StrategyEvaluation;
#define StrategyTransformMapIsValid(transform) PointerIsValid(transform) #define StrategyTransformMapIsValid(transform) PointerIsValid(transform)
#ifndef CorrectStrategies /* XXX this should be removable */
#define AMStrategies(foo) 12
#else /* !defined(CorrectStrategies) */
#define AMStrategies(foo) (foo) #define AMStrategies(foo) (foo)
#endif /* !defined(CorrectStrategies) */
typedef struct StrategyMapData typedef struct StrategyMapData
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment