63 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
66 opfamilyoid = classform->opcfamily;
67 opcintype = classform->opcintype;
68 opclassname =
NameStr(classform->opcname);
73 elog(
ERROR,
"cache lookup failed for operator family %u", opfamilyoid);
76 opfamilyname =
NameStr(familyform->opfname);
93 if (procform->amproclefttype != procform->amprocrighttype)
96 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
97 errmsg(
"operator family \"%s\" of access method %s contains support function %s with different left and right input types",
104 switch (procform->amprocnum)
108 1, 1, procform->amproclefttype);
112 2, 2, procform->amproclefttype, INT8OID);
119 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
120 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
121 opfamilyname,
"hash",
123 procform->amprocnum)));
131 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
132 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
133 opfamilyname,
"hash",
135 procform->amprocnum)));
153 if (oprform->amopstrategy < 1 ||
157 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
158 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
159 opfamilyname,
"hash",
161 oprform->amopstrategy)));
166 if (oprform->amoppurpose != AMOP_SEARCH ||
170 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
171 errmsg(
"operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
172 opfamilyname,
"hash",
179 oprform->amoplefttype,
180 oprform->amoprighttype))
183 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
184 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
185 opfamilyname,
"hash",
195 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
196 errmsg(
"operator family \"%s\" of access method %s lacks support function for operator %s",
197 opfamilyname,
"hash",
206 foreach(lc, grouplist)
211 if (thisgroup->
lefttype == opcintype &&
213 opclassgroup = thisgroup;
223 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
224 errmsg(
"operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
225 opfamilyname,
"hash",
237 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
238 errmsg(
"operator class \"%s\" of access method %s is missing operator(s)",
239 opclassname,
"hash")));
253 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
254 errmsg(
"operator family \"%s\" of access method %s is missing cross-type operator(s)",
255 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)
bool list_member_oid(const List *list, Oid datum)
List * list_concat_copy(const List *list1, const List *list2)
List * list_append_unique_oid(List *list, Oid datum)
Oid get_opclass_input_type(Oid opclass)
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
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)
#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)