60 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
63 opfamilyoid = classform->opcfamily;
64 opcintype = classform->opcintype;
65 opclassname =
NameStr(classform->opcname);
70 elog(
ERROR,
"cache lookup failed for operator family %u", opfamilyoid);
73 opfamilyname =
NameStr(familyform->opfname);
87 switch (procform->amprocnum)
95 4, 4, INTERNALOID, INTERNALOID,
96 INTERNALOID, INTERNALOID);
100 3, 4, INTERNALOID, INTERNALOID,
101 INTERNALOID, INT4OID);
105 3, 3, INTERNALOID, INTERNALOID,
117 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
118 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
119 opfamilyname,
"brin",
121 procform->amprocnum)));
133 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
134 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
135 opfamilyname,
"brin",
137 procform->amprocnum)));
142 allfuncs |= ((uint64) 1) << procform->amprocnum;
152 if (oprform->amopstrategy < 1 || oprform->amopstrategy > 63)
155 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
156 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
157 opfamilyname,
"brin",
159 oprform->amopstrategy)));
175 if (oprform->amoplefttype == oprform->amoprighttype)
176 allops |= ((uint64) 1) << oprform->amopstrategy;
180 if (oprform->amoppurpose != AMOP_SEARCH ||
184 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
185 errmsg(
"operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
186 opfamilyname,
"brin",
193 oprform->amoplefttype,
194 oprform->amoprighttype))
197 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
198 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
199 opfamilyname,
"brin",
208 foreach(lc, grouplist)
213 if (thisgroup->
lefttype == opcintype &&
215 opclassgroup = thisgroup;
235 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
236 errmsg(
"operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
237 opfamilyname,
"brin",
245 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
246 errmsg(
"operator family \"%s\" of access method %s is missing support function(s) for types %s and %s",
247 opfamilyname,
"brin",
255 if (!opclassgroup || opclassgroup->
operatorset != allops)
258 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
259 errmsg(
"operator class \"%s\" of access method %s is missing operator(s)",
260 opclassname,
"brin")));
269 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
270 errmsg(
"operator class \"%s\" of access method %s is missing support function %d",
271 opclassname,
"brin",
i)));
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 BRIN_LAST_OPTIONAL_PROCNUM
#define BRIN_PROCNUM_UNION
#define BRIN_MANDATORY_NPROCS
#define BRIN_PROCNUM_OPTIONS
#define BRIN_FIRST_OPTIONAL_PROCNUM
#define BRIN_PROCNUM_OPCINFO
#define BRIN_PROCNUM_CONSISTENT
#define BRIN_PROCNUM_ADDVALUE
bool brinvalidate(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)