]> granicus.if.org Git - postgresql/commitdiff
index strategy cleanup
authorBruce Momjian <bruce@momjian.us>
Tue, 11 Aug 1998 19:32:39 +0000 (19:32 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 11 Aug 1998 19:32:39 +0000 (19:32 +0000)
src/backend/access/index/istrat.c
src/backend/optimizer/path/indxpath.c
src/include/access/strat.h

index cd7c71d83f387af700521ae9ee0c4434b74ce6ee..546f140793b52b43aa9f3ea498028ba0a457186a 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * 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,
        {
                if (!StrategyOperatorIsValid(&term->operatorData[index],
                                                                         maxStrategy))
-               {
-
                        return false;
-               }
        }
 
        return true;
@@ -574,8 +571,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
                        break;
                }
 
-               operatorClassObjectId[attributeIndex]
-                       = iform->indclass[attributeIndex];
+               operatorClassObjectId[attributeIndex] = iform->indclass[attributeIndex];
        }
 
        heap_endscan(scan);
@@ -592,14 +588,11 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
                ScanKeyEntryInitialize(&entry[1], 0, Anum_pg_amproc_amopclaid,
                                                           F_OIDEQ, 0);
 
-/*             relation = heap_openr(Name_pg_amproc); */
                relation = heap_openr(AccessMethodProcedureRelationName);
 
-
                for (attributeNumber = maxAttributeNumber; attributeNumber > 0;
                         attributeNumber--)
                {
-
                        int16           support;
                        Form_pg_amproc form;
                        RegProcedure *loc;
index d62c92e283726c04a45357ce3bce78881326e689..2932f82b7ecd1310bc164c36b2d730924d09570e 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * 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)
        /*
         * 1. Find a "btree" strategy number for the pred_op
         */
-       /* XXX - hardcoded amopid value 403 to find "btree" operator classes */
        ScanKeyEntryInitialize(&entry[0], 0,
                                                   Anum_pg_amop_amopid,
                                                   F_OIDEQ,
-                                                  ObjectIdGetDatum(403));
+                                                  ObjectIdGetDatum(BTREE_AM_OID));
 
        ScanKeyEntryInitialize(&entry[1], 0,
                                                   Anum_pg_amop_amopopr,
index 0c3e82e9a2a9084be8be64fc58d0ce6225e5e865..a5d08ed2b404fbf91d0bb669e0f6df0f1ea426ad 100644 (file)
@@ -7,7 +7,7 @@
  *
  * 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;
 #define StrategyTransformMapIsValid(transform) PointerIsValid(transform)
 
 
-#ifndef CorrectStrategies              /* XXX this should be removable */
-#define AMStrategies(foo)              12
-#else                                                  /* !defined(CorrectStrategies) */
 #define AMStrategies(foo)              (foo)
-#endif                                                 /* !defined(CorrectStrategies) */
 
 typedef struct StrategyMapData
 {