54 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
57 opfamilyoid = classform->opcfamily;
58 opcintype = classform->opcintype;
59 opckeytype = classform->opckeytype;
61 opckeytype = opcintype;
62 opclassname =
NameStr(classform->opcname);
67 elog(
ERROR,
"cache lookup failed for operator family %u", opfamilyoid);
70 opfamilyname =
NameStr(familyform->opfname);
87 if (procform->amproclefttype != procform->amprocrighttype)
90 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
91 errmsg(
"bloom opfamily %s contains support procedure %s with cross-type registration",
101 if (procform->amproclefttype != opcintype)
105 switch (procform->amprocnum)
116 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
117 errmsg(
"bloom opfamily %s contains function %s with invalid support number %d",
120 procform->amprocnum)));
128 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
129 errmsg(
"gist opfamily %s contains function %s with wrong signature for support number %d",
132 procform->amprocnum)));
144 if (oprform->amopstrategy < 1 ||
148 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
149 errmsg(
"bloom opfamily %s contains operator %s with invalid strategy number %d",
152 oprform->amopstrategy)));
157 if (oprform->amoppurpose != AMOP_SEARCH ||
161 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
162 errmsg(
"bloom opfamily %s contains invalid ORDER BY specification for operator %s",
170 oprform->amoplefttype,
171 oprform->amoprighttype))
174 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
175 errmsg(
"bloom opfamily %s contains operator %s with wrong signature",
185 foreach(lc, grouplist)
190 if (thisgroup->
lefttype == opcintype &&
192 opclassgroup = thisgroup;
213 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
214 errmsg(
"bloom opclass %s is missing support function %d",
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 BLOOM_NSTRATEGIES
#define BLOOM_OPTIONS_PROC
bool blvalidate(Oid opclassoid)
#define OidIsValid(objectId)
void ReleaseCatCacheList(CatCList *list)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define HeapTupleIsValid(tuple)
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)
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)