59 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
62 opfamilyoid = classform->opcfamily;
63 opcintype = classform->opcintype;
64 opclassname =
NameStr(classform->opcname);
69 elog(
ERROR,
"cache lookup failed for operator family %u", opfamilyoid);
72 opfamilyname =
NameStr(familyform->opfname);
86 switch (procform->amprocnum)
90 2, 2, procform->amproclefttype,
91 procform->amprocrighttype);
99 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
100 errmsg(
"btree opfamily %s contains function %s with invalid support number %d",
103 procform->amprocnum)));
111 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
112 errmsg(
"btree opfamily %s contains function %s with wrong signature for support number %d",
115 procform->amprocnum)));
127 if (oprform->amopstrategy < 1 ||
131 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
132 errmsg(
"btree opfamily %s contains operator %s with invalid strategy number %d",
135 oprform->amopstrategy)));
144 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
145 errmsg(
"btree opfamily %s contains invalid ORDER BY specification for operator %s",
153 oprform->amoplefttype,
154 oprform->amoprighttype))
157 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
158 errmsg(
"btree opfamily %s contains operator %s with wrong signature",
169 foreach(lc, grouplist)
174 if (thisgroup->
lefttype == opcintype &&
176 opclassgroup = thisgroup;
199 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
200 errmsg(
"btree opfamily %s is missing operator(s) for types %s and %s",
209 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
210 errmsg(
"btree opfamily %s is missing support function for types %s and %s",
223 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
224 errmsg(
"btree opclass %s is missing operator(s)",
240 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
241 errmsg(
"btree opfamily %s is missing cross-type operator(s)",
#define BTGreaterStrategyNumber
List * list_append_unique_oid(List *list, Oid datum)
#define BTSORTSUPPORT_PROC
FormData_pg_amproc * Form_pg_amproc
int errcode(int sqlerrcode)
char * format_operator(Oid operator_oid)
#define OidIsValid(objectId)
#define SearchSysCache1(cacheId, key1)
bool btvalidate(Oid opclassoid)
#define BTLessEqualStrategyNumber
void ReleaseCatCacheList(CatCList *list)
CatCTup * members[FLEXIBLE_ARRAY_MEMBER]
bool check_amproc_signature(Oid funcid, Oid restype, bool exact, int minargs, int maxargs,...)
#define ObjectIdGetDatum(X)
List * identify_opfamily_groups(CatCList *oprlist, CatCList *proclist)
#define SearchSysCacheList1(cacheId, key1)
#define ereport(elevel, rest)
FormData_pg_opfamily * Form_pg_opfamily
void ReleaseSysCache(HeapTuple tuple)
char * format_procedure(Oid procedure_oid)
#define HeapTupleIsValid(tuple)
static int list_length(const List *l)
bool check_amop_signature(Oid opno, Oid restype, Oid lefttype, Oid righttype)
int errmsg(const char *fmt,...)
FormData_pg_amop * Form_pg_amop
#define BTMaxStrategyNumber
#define BTLessStrategyNumber
FormData_pg_opclass * Form_pg_opclass
#define BTEqualStrategyNumber
#define BTGreaterEqualStrategyNumber