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);
95 if (procform->amproclefttype != procform->amprocrighttype)
98 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
99 errmsg(
"operator family \"%s\" of access method %s contains support function %s with different left and right input types",
100 opfamilyname,
"spgist",
106 switch (procform->amprocnum)
110 2, 2, INTERNALOID, INTERNALOID);
111 configIn.
attType = procform->amproclefttype;
112 memset(&configOut, 0,
sizeof(configOut));
118 configOutLefttype = procform->amproclefttype;
119 configOutRighttype = procform->amprocrighttype;
129 foreach(lc, grouplist)
133 if (group->
lefttype == procform->amproclefttype &&
134 group->
righttype == procform->amprocrighttype)
147 2, 2, INTERNALOID, INTERNALOID);
151 2, 2, INTERNALOID, INTERNALOID);
154 if (configOutLefttype != procform->amproclefttype ||
155 configOutRighttype != procform->amprocrighttype)
160 1, 1, procform->amproclefttype);
167 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
168 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
169 opfamilyname,
"spgist",
171 procform->amprocnum)));
179 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
180 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
181 opfamilyname,
"spgist",
183 procform->amprocnum)));
196 if (oprform->amopstrategy < 1 || oprform->amopstrategy > 63)
199 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
200 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
201 opfamilyname,
"spgist",
203 oprform->amopstrategy)));
208 if (oprform->amoppurpose != AMOP_SEARCH)
215 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
216 errmsg(
"operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
217 opfamilyname,
"spgist",
223 op_rettype = BOOLOID;
227 oprform->amoplefttype,
228 oprform->amoprighttype))
231 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
232 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
233 opfamilyname,
"spgist",
241 foreach(lc, grouplist)
246 if (thisgroup->
lefttype == opcintype &&
248 opclassgroup = thisgroup;
258 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
259 errmsg(
"operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
260 opfamilyname,
"spgist",
275 if ((thisgroup->
functionset & (((uint64) 1) << i)) != 0)
280 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
281 errmsg(
"operator family \"%s\" of access method %s is missing support function %d for type %s",
282 opfamilyname,
"spgist", i,
293 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
294 errmsg(
"operator class \"%s\" of access method %s is missing operator(s)",
295 opclassname,
"spgist")));
#define SPGIST_OPTIONS_PROC
#define SPGIST_LEAF_CONSISTENT_PROC
bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid)
#define PointerGetDatum(X)
FormData_pg_amproc * Form_pg_amproc
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 ObjectIdGetDatum(X)
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,...)
char * format_procedure(Oid procedure_oid)
#define HeapTupleIsValid(tuple)
#define SPGIST_COMPRESS_PROC
#define SPGIST_CONFIG_PROC
bool check_amop_signature(Oid opno, Oid restype, Oid lefttype, Oid righttype)
#define OidFunctionCall2(functionId, arg1, arg2)
int errmsg(const char *fmt,...)
FormData_pg_amop * Form_pg_amop
#define SPGIST_INNER_CONSISTENT_PROC
#define SPGIST_CHOOSE_PROC
FormData_pg_opclass * Form_pg_opclass
#define SPGIST_PICKSPLIT_PROC