20#include "utils/fmgrprotos.h"
42 elog(
ERROR,
"index access method handler function %u did not return an IndexAmRoutine struct",
81 elog(
ERROR,
"cache lookup failed for access method %u",
87 if (amform->amtype != AMTYPE_INDEX)
95 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
96 errmsg(
"access method \"%s\" is not of type %s",
97 NameStr(amform->amname),
"INDEX")));
100 amhandler = amform->amhandler;
111 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
112 errmsg(
"index access method \"%s\" does not have a handler",
137 if (amoid == BTREE_AM_OID &&
148 elog(
ERROR,
"could not translate strategy number %d for index AM %u", strategy, amoid);
167 if (amoid == BTREE_AM_OID &&
178 elog(
ERROR,
"could not translate compare type %u for index AM %u", cmptype, amoid);
198 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
201 amoid = classform->opcmethod;
208 elog(
ERROR,
"function amvalidate is not defined for index access method %u",
IndexAmRoutine * GetIndexAmRoutine(Oid amhandler)
StrategyNumber IndexAmTranslateCompareType(CompareType cmptype, Oid amoid, Oid opfamily, bool missing_ok)
Datum amvalidate(PG_FUNCTION_ARGS)
CompareType IndexAmTranslateStrategy(StrategyNumber strategy, Oid amoid, Oid opfamily, bool missing_ok)
IndexAmRoutine * GetIndexAmRoutineByAmId(Oid amoid, bool noerror)
#define RegProcedureIsValid(p)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define OidFunctionCall0(functionId)
#define PG_RETURN_BOOL(x)
Assert(PointerIsAligned(start, uint64))
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
void pfree(void *pointer)
#define IsA(nodeptr, _type_)
FormData_pg_am * Form_pg_am
FormData_pg_opclass * Form_pg_opclass
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
#define BTMaxStrategyNumber
ambuildempty_function ambuildempty
amvacuumcleanup_function amvacuumcleanup
amoptions_function amoptions
aminsert_function aminsert
amendscan_function amendscan
amtranslate_strategy_function amtranslatestrategy
amtranslate_cmptype_function amtranslatecmptype
amcostestimate_function amcostestimate
ambulkdelete_function ambulkdelete
amvalidate_function amvalidate
ambeginscan_function ambeginscan
amrescan_function amrescan
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)