55 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
58 opfamilyoid = classform->opcfamily;
59 opcintype = classform->opcintype;
60 opckeytype = classform->opckeytype;
62 opckeytype = opcintype;
63 opclassname =
NameStr(classform->opcname);
68 elog(
ERROR,
"cache lookup failed for operator family %u", opfamilyoid);
71 opfamilyname =
NameStr(familyform->opfname);
88 if (procform->amproclefttype != procform->amprocrighttype)
91 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
92 errmsg(
"operator family \"%s\" of access method %s contains support function %s with different left and right input types",
102 if (procform->amproclefttype != opcintype)
106 switch (procform->amprocnum)
110 2, 2, opckeytype, opckeytype);
115 2, 3, opcintype, INTERNALOID,
121 5, 7, opcintype, INTERNALOID,
122 INT2OID, INTERNALOID, INTERNALOID,
123 INTERNALOID, INTERNALOID);
128 6, 8, INTERNALOID, INT2OID,
130 INTERNALOID, INTERNALOID,
131 INTERNALOID, INTERNALOID);
135 4, 4, opckeytype, opckeytype,
136 INT2OID, INTERNALOID);
140 7, 7, INTERNALOID, INT2OID,
142 INTERNALOID, INTERNALOID,
150 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
151 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
154 procform->amprocnum)));
162 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
163 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
166 procform->amprocnum)));
178 if (oprform->amopstrategy < 1 || oprform->amopstrategy > 63)
181 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
182 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
185 oprform->amopstrategy)));
190 if (oprform->amoppurpose != AMOP_SEARCH ||
194 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
195 errmsg(
"operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
203 oprform->amoplefttype,
204 oprform->amoprighttype))
207 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
208 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
218 foreach(lc, grouplist)
223 if (thisgroup->
lefttype == opcintype &&
225 opclassgroup = thisgroup;
241 (opclassgroup->
functionset & (((uint64) 1) << i)) != 0)
249 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
250 errmsg(
"operator class \"%s\" of access method %s is missing support function %d",
251 opclassname,
"gin", i)));
259 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
260 errmsg(
"operator class \"%s\" of access method %s is missing support function %d or %d",
#define GIN_EXTRACTQUERY_PROC
FormData_pg_amproc * Form_pg_amproc
int errcode(int sqlerrcode)
#define GIN_TRICONSISTENT_PROC
char * format_operator(Oid operator_oid)
#define GIN_COMPARE_PARTIAL_PROC
#define OidIsValid(objectId)
bool check_amoptsproc_signature(Oid funcid)
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 GIN_CONSISTENT_PROC
#define SearchSysCacheList1(cacheId, key1)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
FormData_pg_opfamily * Form_pg_opfamily
void ReleaseSysCache(HeapTuple tuple)
#define ereport(elevel,...)
char * format_procedure(Oid procedure_oid)
#define HeapTupleIsValid(tuple)
#define GIN_EXTRACTVALUE_PROC
bool check_amop_signature(Oid opno, Oid restype, Oid lefttype, Oid righttype)
int errmsg(const char *fmt,...)
FormData_pg_amop * Form_pg_amop
FormData_pg_opclass * Form_pg_opclass