56 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
59 opfamilyoid = classform->opcfamily;
60 opcintype = classform->opcintype;
61 opckeytype = classform->opckeytype;
63 opckeytype = opcintype;
64 opclassname =
NameStr(classform->opcname);
69 elog(
ERROR,
"cache lookup failed for operator family %u", opfamilyoid);
72 opfamilyname =
NameStr(familyform->opfname);
89 if (procform->amproclefttype != procform->amprocrighttype)
92 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
93 errmsg(
"operator family \"%s\" of access method %s contains support function %s with different left and right input types",
103 if (procform->amproclefttype != opcintype)
107 switch (procform->amprocnum)
111 5, 5, INTERNALOID, opcintype,
112 INT2OID, OIDOID, INTERNALOID);
116 2, 2, INTERNALOID, INTERNALOID);
127 INTERNALOID, INTERNALOID);
131 2, 2, INTERNALOID, INTERNALOID);
135 3, 3, opckeytype, opckeytype,
140 5, 5, INTERNALOID, opcintype,
141 INT2OID, OIDOID, INTERNALOID);
152 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
153 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
154 opfamilyname,
"gist",
156 procform->amprocnum)));
164 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
165 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
166 opfamilyname,
"gist",
168 procform->amprocnum)));
181 if (oprform->amopstrategy < 1)
184 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
185 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
186 opfamilyname,
"gist",
188 oprform->amopstrategy)));
193 if (oprform->amoppurpose != AMOP_SEARCH)
197 oprform->amoplefttype,
198 oprform->amoplefttype,
202 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
203 errmsg(
"operator family \"%s\" of access method %s contains unsupported ORDER BY specification for operator %s",
204 opfamilyname,
"gist",
213 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
214 errmsg(
"operator family \"%s\" of access method %s contains incorrect ORDER BY opfamily specification for operator %s",
215 opfamilyname,
"gist",
223 op_rettype = BOOLOID;
228 oprform->amoplefttype,
229 oprform->amoprighttype))
232 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
233 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
234 opfamilyname,
"gist",
243 foreach(lc, grouplist)
248 if (thisgroup->
lefttype == opcintype &&
250 opclassgroup = thisgroup;
266 (opclassgroup->
functionset & (((uint64) 1) << i)) != 0)
273 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
274 errmsg(
"operator class \"%s\" of access method %s is missing support function %d",
275 opclassname,
"gist", i)));
#define GIST_OPTIONS_PROC
bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid)
FormData_pg_amproc * Form_pg_amproc
#define GIST_SORTSUPPORT_PROC
int errcode(int sqlerrcode)
char * format_operator(Oid operator_oid)
#define OidIsValid(objectId)
Oid get_op_rettype(Oid opno)
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 GIST_PICKSPLIT_PROC
#define ObjectIdGetDatum(X)
#define GIST_COMPRESS_PROC
List * identify_opfamily_groups(CatCList *oprlist, CatCList *proclist)
#define SearchSysCacheList1(cacheId, key1)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
FormData_pg_opfamily * Form_pg_opfamily
void ReleaseSysCache(HeapTuple tuple)
#define ereport(elevel,...)
#define GIST_CONSISTENT_PROC
char * format_procedure(Oid procedure_oid)
#define HeapTupleIsValid(tuple)
Oid get_opfamily_proc(Oid opfamily, Oid lefttype, Oid righttype, int16 procnum)
#define GIST_PENALTY_PROC
#define GIST_DISTANCE_PROC
bool check_amop_signature(Oid opno, Oid restype, Oid lefttype, Oid righttype)
int errmsg(const char *fmt,...)
FormData_pg_amop * Form_pg_amop
#define GIST_DECOMPRESS_PROC
FormData_pg_opclass * Form_pg_opclass