58 elog(
ERROR,
"cache lookup failed for operator class %u", opclassoid);
61 opfamilyoid = classform->opcfamily;
62 opcintype = classform->opcintype;
63 opclassname =
NameStr(classform->opcname);
80 switch (procform->amprocnum)
88 4, 4, INTERNALOID, INTERNALOID,
89 INTERNALOID, INTERNALOID);
93 3, 4, INTERNALOID, INTERNALOID,
94 INTERNALOID, INT4OID);
98 3, 3, INTERNALOID, INTERNALOID,
110 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
111 errmsg(
"operator family \"%s\" of access method %s contains function %s with invalid support number %d",
112 opfamilyname,
"brin",
114 procform->amprocnum)));
126 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
127 errmsg(
"operator family \"%s\" of access method %s contains function %s with wrong signature for support number %d",
128 opfamilyname,
"brin",
130 procform->amprocnum)));
135 allfuncs |= ((
uint64) 1) << procform->amprocnum;
145 if (oprform->amopstrategy < 1 || oprform->amopstrategy > 63)
148 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
149 errmsg(
"operator family \"%s\" of access method %s contains operator %s with invalid strategy number %d",
150 opfamilyname,
"brin",
152 oprform->amopstrategy)));
168 if (oprform->amoplefttype == oprform->amoprighttype)
169 allops |= ((
uint64) 1) << oprform->amopstrategy;
173 if (oprform->amoppurpose != AMOP_SEARCH ||
177 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
178 errmsg(
"operator family \"%s\" of access method %s contains invalid ORDER BY specification for operator %s",
179 opfamilyname,
"brin",
186 oprform->amoplefttype,
187 oprform->amoprighttype))
190 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
191 errmsg(
"operator family \"%s\" of access method %s contains operator %s with wrong signature",
192 opfamilyname,
"brin",
201 foreach(lc, grouplist)
206 if (thisgroup->
lefttype == opcintype &&
208 opclassgroup = thisgroup;
228 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
229 errmsg(
"operator family \"%s\" of access method %s is missing operator(s) for types %s and %s",
230 opfamilyname,
"brin",
238 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
239 errmsg(
"operator family \"%s\" of access method %s is missing support function(s) for types %s and %s",
240 opfamilyname,
"brin",
248 if (!opclassgroup || opclassgroup->
operatorset != allops)
251 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
252 errmsg(
"operator class \"%s\" of access method %s is missing operator(s)",
253 opclassname,
"brin")));
262 (
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
263 errmsg(
"operator class \"%s\" of access method %s is missing support function %d",
264 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)
static void * GETSTRUCT(const HeapTupleData *tuple)
char * get_opfamily_name(Oid opfid, bool missing_ok)
FormData_pg_amop * Form_pg_amop
FormData_pg_amproc * Form_pg_amproc
FormData_pg_opclass * Form_pg_opclass
static Datum ObjectIdGetDatum(Oid X)
char * format_procedure(Oid procedure_oid)
char * format_operator(Oid operator_oid)
CatCTup * members[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
#define SearchSysCacheList1(cacheId, key1)