60 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
63 opfamilyoid = classform->opcfamily;
64 opcintype = classform->opcintype;
65 opclassname =
NameStr(classform->opcname);
85 if (procform->amproclefttype != procform->amprocrighttype)
88 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
89 errmsg(
"operator family \"%s\" of access method %s contains support function %s with different left and right input types",
96 switch (procform->amprocnum)
100 1, 1, procform->amproclefttype);
104 2, 2, procform->amproclefttype, INT8OID);
111 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
112 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
113 opfamilyname,
"hash",
115 procform->amprocnum)));
123 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
124 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
125 opfamilyname,
"hash",
127 procform->amprocnum)));
145 if (oprform->amopstrategy < 1 ||
149 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
150 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
151 opfamilyname,
"hash",
153 oprform->amopstrategy)));
158 if (oprform->amoppurpose != AMOP_SEARCH ||
162 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
163 errmsg(
"operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
164 opfamilyname,
"hash",
171 oprform->amoplefttype,
172 oprform->amoprighttype))
175 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
176 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
177 opfamilyname,
"hash",
187 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
188 errmsg(
"operator family \"%s\" of access method %s lacks support function for operator %s",
189 opfamilyname,
"hash",
198 foreach(lc, grouplist)
203 if (thisgroup->
lefttype == opcintype &&
205 opclassgroup = thisgroup;
215 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
216 errmsg(
"operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
217 opfamilyname,
"hash",
229 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
230 errmsg(
"operator class \"%s\" of access method %s is missing operator(s)",
231 opclassname,
"hash")));
245 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
246 errmsg(
"operator family \"%s\" of access method %s is missing cross-type operator(s)",
247 opfamilyname,
"hash")));
Oid opclass_for_family_datatype(Oid amoid, Oid opfamilyoid, Oid datatypeoid)
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 HASHSTANDARD_PROC
#define HASHEXTENDED_PROC
void hashadjustmembers(Oid opfamilyoid, Oid opclassoid, List *operators, List *functions)
bool hashvalidate(Oid opclassoid)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
List * list_concat_copy(const List *list1, const List *list2)
List * list_append_unique_oid(List *list, Oid datum)
bool list_member_oid(const List *list, Oid datum)
Oid get_opclass_input_type(Oid opclass)
char * get_opfamily_name(Oid opfid, bool missing_ok)
FormData_pg_amop * Form_pg_amop
FormData_pg_amproc * Form_pg_amproc
static int list_length(const List *l)
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)
#define HTMaxStrategyNumber
#define HTEqualStrategyNumber
CatCTup * members[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
#define SearchSysCacheList1(cacheId, key1)
void CommandCounterIncrement(void)