aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/index
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/index')
-rw-r--r--src/backend/access/index/indexam.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c
index dc08d10bc31..3c286f6ec74 100644
--- a/src/backend/access/index/indexam.c
+++ b/src/backend/access/index/indexam.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.38 1999/12/30 05:04:50 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.39 2000/01/22 23:50:09 tgl Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relationId
@@ -69,21 +69,6 @@
#include "access/heapam.h"
#include "utils/relcache.h"
-/* ----------------
- * undefine macros we aren't going to use that would otherwise
- * get in our way.. delete is defined in c.h and the am's are
- * defined in heapam.h
- * ----------------
- */
-#undef delete
-#undef aminsert
-#undef amdelete
-#undef ambeginscan
-#undef amrescan
-#undef amendscan
-#undef ammarkpos
-#undef amrestrpos
-#undef amgettuple
/* ----------------------------------------------------------------
* macros used in index_ routines
@@ -359,6 +344,27 @@ index_getnext(IndexScanDesc scan,
}
/* ----------------
+ * index_cost_estimator
+ *
+ * Fetch the amcostestimate procedure OID for an index.
+ *
+ * We could combine fetching and calling the procedure,
+ * as index_insert does for example; but that would require
+ * importing a bunch of planner/optimizer stuff into this file.
+ * ----------------
+ */
+RegProcedure
+index_cost_estimator(Relation relation)
+{
+ RegProcedure procedure;
+
+ RELATION_CHECKS;
+ GET_REL_PROCEDURE(cost_estimator, amcostestimate);
+
+ return procedure;
+}
+
+/* ----------------
* index_getprocid
*
* Some indexed access methods may require support routines that are