61 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
64 opfamilyoid = classform->opcfamily;
65 opcintype = classform->opcintype;
66 opclassname =
NameStr(classform->opcname);
83 switch (procform->amprocnum)
87 2, 2, procform->amproclefttype,
88 procform->amprocrighttype);
97 procform->amproclefttype,
98 procform->amproclefttype,
99 procform->amprocrighttype,
115 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
116 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
117 opfamilyname,
"btree",
119 procform->amprocnum)));
127 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
128 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
129 opfamilyname,
"btree",
131 procform->amprocnum)));
143 if (oprform->amopstrategy < 1 ||
147 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
148 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
149 opfamilyname,
"btree",
151 oprform->amopstrategy)));
156 if (oprform->amoppurpose != AMOP_SEARCH ||
160 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
161 errmsg(
"operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
162 opfamilyname,
"btree",
169 oprform->amoplefttype,
170 oprform->amoprighttype))
173 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
174 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
175 opfamilyname,
"btree",
186 foreach(lc, grouplist)
206 if (thisgroup->
lefttype == opcintype &&
208 opclassgroup = thisgroup;
231 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
232 errmsg(
"operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
233 opfamilyname,
"btree",
241 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
242 errmsg(
"operator family \"%s\" of access method %s is missing support function for types %s and %s",
243 opfamilyname,
"btree",
255 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
256 errmsg(
"operator class \"%s\" of access method %s is missing operator(s)",
257 opclassname,
"btree")));
271 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
272 errmsg(
"operator family \"%s\" of access method %s is missing cross-type operator(s)",
273 opfamilyname,
"btree")));
Oid opclass_for_family_datatype(Oid amoid, Oid opfamilyoid, Oid datatypeoid)
bool check_amproc_signature(Oid funcid, Oid restype, bool exact, int minargs, int maxargs,...)
bool check_amop_signature(Oid opno, Oid restype, Oid lefttype, Oid righttype)
List * identify_opfamily_groups(CatCList *oprlist, CatCList *proclist)
bool check_amoptsproc_signature(Oid funcid)
#define OidIsValid(objectId)
void ReleaseCatCacheList(CatCList *list)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
List * list_concat_copy(const List *list1, const List *list2)
List * list_append_unique_oid(List *list, Oid datum)
Oid get_opclass_input_type(Oid opclass)
char * get_opfamily_name(Oid opfid, bool missing_ok)
#define BTEQUALIMAGE_PROC
#define BTSKIPSUPPORT_PROC
#define BTSORTSUPPORT_PROC
bool btvalidate(Oid opclassoid)
void btadjustmembers(Oid opfamilyoid, Oid opclassoid, List *operators, List *functions)
FormData_pg_amop * Form_pg_amop
FormData_pg_amproc * Form_pg_amproc
static int list_length(const List *l)
FormData_pg_opclass * Form_pg_opclass
static Datum ObjectIdGetDatum(Oid X)
static const struct fns functions
char * format_procedure(Oid procedure_oid)
char * format_operator(Oid operator_oid)
#define BTGreaterStrategyNumber
#define BTMaxStrategyNumber
#define BTLessStrategyNumber
#define BTEqualStrategyNumber
#define BTLessEqualStrategyNumber
#define BTGreaterEqualStrategyNumber
CatCTup * members[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
#define SearchSysCacheList1(cacheId, key1)
void CommandCounterIncrement(void)