51 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
54 opfamilyoid = classform->opcfamily;
55 opcintype = classform->opcintype;
56 opckeytype = classform->opckeytype;
58 opckeytype = opcintype;
59 opclassname =
NameStr(classform->opcname);
79 if (procform->amproclefttype != procform->amprocrighttype)
82 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
83 errmsg(
"operator family \"%s\" of access method %s contains support function %s with different left and right input types",
93 if (procform->amproclefttype != opcintype)
97 switch (procform->amprocnum)
101 2, 2, opckeytype, opckeytype);
106 2, 3, opcintype, INTERNALOID,
112 5, 7, opcintype, INTERNALOID,
113 INT2OID, INTERNALOID, INTERNALOID,
114 INTERNALOID, INTERNALOID);
119 6, 8, INTERNALOID, INT2OID,
121 INTERNALOID, INTERNALOID,
122 INTERNALOID, INTERNALOID);
126 4, 4, opckeytype, opckeytype,
127 INT2OID, INTERNALOID);
131 7, 7, INTERNALOID, INT2OID,
133 INTERNALOID, INTERNALOID,
141 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
142 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
145 procform->amprocnum)));
153 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
154 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
157 procform->amprocnum)));
169 if (oprform->amopstrategy < 1 || oprform->amopstrategy > 63)
172 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
173 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
176 oprform->amopstrategy)));
181 if (oprform->amoppurpose != AMOP_SEARCH ||
185 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
186 errmsg(
"operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
194 oprform->amoplefttype,
195 oprform->amoprighttype))
198 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
199 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
209 foreach(lc, grouplist)
214 if (thisgroup->
lefttype == opcintype &&
216 opclassgroup = thisgroup;
240 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
241 errmsg(
"operator class \"%s\" of access method %s is missing support function %d",
242 opclassname,
"gin",
i)));
250 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
251 errmsg(
"operator class \"%s\" of access method %s is missing support function %d or %d",
283 foreach(lc, operators)
322 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
323 errmsg(
"support function number %d is invalid for access method %s",
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 GIN_CONSISTENT_PROC
#define GIN_EXTRACTQUERY_PROC
#define GIN_EXTRACTVALUE_PROC
#define GIN_TRICONSISTENT_PROC
#define GIN_COMPARE_PARTIAL_PROC
bool ginvalidate(Oid opclassoid)
void ginadjustmembers(Oid opfamilyoid, Oid opclassoid, List *operators, List *functions)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
char * get_opfamily_name(Oid opfid, bool missing_ok)
FormData_pg_amop * Form_pg_amop
FormData_pg_amproc * Form_pg_amproc
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)
CatCTup * members[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
#define SearchSysCacheList1(cacheId, key1)