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;
273 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
274 errmsg(
"operator class \"%s\" of access method %s is missing support function %d",
275 opclassname,
"gist",
i)));
306 foreach(lc, operators)
349 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
350 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 opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid)
bool check_amoptsproc_signature(Oid funcid)
#define OidIsValid(objectId)
void ReleaseCatCacheList(CatCList *list)
elog(ERROR, "%s: %s", p2, msg)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define GIST_DECOMPRESS_PROC
#define GIST_PICKSPLIT_PROC
#define GIST_CONSISTENT_PROC
#define GIST_SORTSUPPORT_PROC
#define GIST_COMPRESS_PROC
#define GIST_PENALTY_PROC
#define GIST_OPTIONS_PROC
#define GIST_DISTANCE_PROC
void gistadjustmembers(Oid opfamilyoid, Oid opclassoid, List *operators, List *functions)
bool gistvalidate(Oid opclassoid)
#define HeapTupleIsValid(tuple)
Oid get_opfamily_proc(Oid opfamily, Oid lefttype, Oid righttype, int16 procnum)
Oid get_op_rettype(Oid opno)
FormData_pg_amop * Form_pg_amop
FormData_pg_amproc * Form_pg_amproc
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)
CatCTup * members[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
#define SearchSysCacheList1(cacheId, key1)