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 5, 5, INTERNALOID, opcintype,
111 INT2OID, OIDOID, INTERNALOID);
115 2, 2, INTERNALOID, INTERNALOID);
126 INTERNALOID, INTERNALOID);
130 2, 2, INTERNALOID, INTERNALOID);
134 3, 3, opckeytype, opckeytype,
139 5, 5, INTERNALOID, opcintype,
140 INT2OID, OIDOID, INTERNALOID);
151 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
152 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
153 opfamilyname,
"gist",
155 procform->amprocnum)));
163 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
164 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
165 opfamilyname,
"gist",
167 procform->amprocnum)));
180 if (oprform->amopstrategy < 1)
183 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
184 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
185 opfamilyname,
"gist",
187 oprform->amopstrategy)));
192 if (oprform->amoppurpose != AMOP_SEARCH)
196 oprform->amoplefttype,
197 oprform->amoplefttype,
201 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
202 errmsg(
"operator family \"%s\" of access method %s contains unsupported ORDER BY specification for operator %s",
203 opfamilyname,
"gist",
212 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
213 errmsg(
"operator family \"%s\" of access method %s contains incorrect ORDER BY opfamily specification for operator %s",
214 opfamilyname,
"gist",
222 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,
"gist",
242 foreach(lc, grouplist)
247 if (thisgroup->
lefttype == opcintype &&
249 opclassgroup = thisgroup;
272 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
273 errmsg(
"operator class \"%s\" of access method %s is missing support function %d",
274 opclassname,
"gist",
i)));
305 foreach(lc, operators)
348 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
349 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)
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)