64 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
67 opfamilyoid = classform->opcfamily;
68 opcintype = classform->opcintype;
69 opclassname =
NameStr(classform->opcname);
74 elog(
ERROR,
"cache lookup failed for operator family %u", opfamilyoid);
77 opfamilyname =
NameStr(familyform->opfname);
91 switch (procform->amprocnum)
95 2, 2, procform->amproclefttype,
96 procform->amprocrighttype);
105 procform->amproclefttype,
106 procform->amproclefttype,
107 procform->amprocrighttype,
119 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
120 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
121 opfamilyname,
"btree",
123 procform->amprocnum)));
131 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
132 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
133 opfamilyname,
"btree",
135 procform->amprocnum)));
147 if (oprform->amopstrategy < 1 ||
151 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
152 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
153 opfamilyname,
"btree",
155 oprform->amopstrategy)));
160 if (oprform->amoppurpose != AMOP_SEARCH ||
164 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
165 errmsg(
"operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
166 opfamilyname,
"btree",
173 oprform->amoplefttype,
174 oprform->amoprighttype))
177 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
178 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
179 opfamilyname,
"btree",
190 foreach(lc, grouplist)
210 if (thisgroup->
lefttype == opcintype &&
212 opclassgroup = thisgroup;
235 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
236 errmsg(
"operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
237 opfamilyname,
"btree",
245 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
246 errmsg(
"operator family \"%s\" of access method %s is missing support function for types %s and %s",
247 opfamilyname,
"btree",
259 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
260 errmsg(
"operator class \"%s\" of access method %s is missing operator(s)",
261 opclassname,
"btree")));
275 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
276 errmsg(
"operator family \"%s\" of access method %s is missing cross-type operator(s)",
277 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)
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)
#define BTEQUALIMAGE_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
FormData_pg_opfamily * Form_pg_opfamily
static Datum ObjectIdGetDatum(Oid X)
static const struct fns functions
char * format_operator(Oid operator_oid)
char * format_procedure(Oid procedure_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)