aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
-rw-r--r--src/backend/access/gist/gistutil.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index d2d0b36d4ea..78e98d68b15 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -21,7 +21,6 @@
#include "common/pg_prng.h"
#include "storage/indexfsm.h"
#include "utils/float.h"
-#include "utils/fmgrprotos.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
@@ -1056,45 +1055,3 @@ gistGetFakeLSN(Relation rel)
return GetFakeLSNForUnloggedRel();
}
}
-
-/*
- * Returns the same number that was received.
- *
- * This is for GiST opclasses that use the RT*StrategyNumber constants.
- */
-Datum
-gist_stratnum_identity(PG_FUNCTION_ARGS)
-{
- StrategyNumber strat = PG_GETARG_UINT16(0);
-
- PG_RETURN_UINT16(strat);
-}
-
-/*
- * Returns the opclass's private stratnum used for the given strategy.
- *
- * Calls the opclass's GIST_STRATNUM_PROC support function, if any,
- * and returns the result.
- * Returns InvalidStrategy if the function is not defined.
- */
-StrategyNumber
-GistTranslateStratnum(Oid opclass, StrategyNumber strat)
-{
- Oid opfamily;
- Oid opcintype;
- Oid funcid;
- Datum result;
-
- /* Look up the opclass family and input datatype. */
- if (!get_opclass_opfamily_and_input_type(opclass, &opfamily, &opcintype))
- return InvalidStrategy;
-
- /* Check whether the function is provided. */
- funcid = get_opfamily_proc(opfamily, opcintype, opcintype, GIST_STRATNUM_PROC);
- if (!OidIsValid(funcid))
- return InvalidStrategy;
-
- /* Ask the translation function */
- result = OidFunctionCall1Coll(funcid, InvalidOid, UInt16GetDatum(strat));
- return DatumGetUInt16(result);
-}