51#include "utils/fmgroids.h"
153 elog(
ERROR,
"operator %u is not a member of opfamily %u",
158 *righttype =
amop_tup->amoprighttype;
297 if (
aform->amoplefttype ==
aform->amoprighttype)
300 *opfamily =
aform->amopfamily;
301 *opcintype =
aform->amoplefttype;
335 &opfamily, &opcintype, &cmptype))
512 if (
aform->amoplefttype ==
aform->amoprighttype)
545 aform->amoprighttype,
546 aform->amoprighttype,
637 if (
aform->amoplefttype ==
aform->amoprighttype)
647 aform->amoprighttype,
648 aform->amoprighttype,
1062 elog(
ERROR,
"cache lookup failed for attribute %d of relation %u",
1116 elog(
ERROR,
"cache lookup failed for attribute %d of relation %u",
1171 elog(
ERROR,
"cache lookup failed for attribute %d of relation %u",
1200 elog(
ERROR,
"cache lookup failed for attribute %d of relation %u",
1235 errmsg(
"cast from type %s to type %s does not exist",
1280 elog(
ERROR,
"cache lookup failed for collation %u", colloid);
1368 elog(
ERROR,
"cache lookup failed for constraint %u", conoid);
1421 elog(
ERROR,
"cache lookup failed for language %u",
1442 elog(
ERROR,
"cache lookup failed for opclass %u", opclass);
1464 elog(
ERROR,
"cache lookup failed for opclass %u", opclass);
1490 *opfamily =
cla_tup->opcfamily;
1491 *opcintype =
cla_tup->opcintype;
1512 elog(
ERROR,
"cache lookup failed for opclass %u", opclass);
1536 elog(
ERROR,
"cache lookup failed for operator family %u",
opfid);
1556 elog(
ERROR,
"cache lookup failed for operator family %u",
opfid);
1657 elog(
ERROR,
"cache lookup failed for operator %u", opno);
1659 *lefttype =
optup->oprleft;
1660 *righttype =
optup->oprright;
1788 elog(
ERROR,
"operator %u does not exist", opno);
1804 elog(
ERROR,
"operator %u does not exist", opno);
1968 elog(
ERROR,
"cache lookup failed for function %u", funcid);
1987 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2010 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2036 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2055 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2074 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2093 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2112 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2131 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2150 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2392 elog(
ERROR,
"cache lookup failed for relation %u", relid);
2414 elog(
ERROR,
"cache lookup failed for relation %u", relid);
2564 elog(
ERROR,
"cache lookup failed for type %u", typid);
2566 *typlen =
typtup->typlen;
2567 *typbyval =
typtup->typbyval;
2585 elog(
ERROR,
"cache lookup failed for type %u", typid);
2587 *typlen =
typtup->typlen;
2588 *typbyval =
typtup->typbyval;
2671 elog(
ERROR,
"binary I/O not supported during bootstrap");
2679 elog(
ERROR,
"cache lookup failed for type %u", typid);
2766 elog(
ERROR,
"cache lookup failed for type %u", typid);
2858 elog(
ERROR,
"cache lookup failed for type %u", typid);
2868 typid =
typTup->typbasetype;
2869 *typmod =
typTup->typtypmod;
2921 return 32 + (1000 - 32) / 2;
3025 elog(
ERROR,
"cache lookup failed for type %u", typid);
3168 typid =
typTup->typbasetype;
3192 if (!
pt->typisdefined)
3195 errmsg(
"type %s is only a shell",
3200 errmsg(
"no input function available for type %s",
3225 if (!
pt->typisdefined)
3228 errmsg(
"type %s is only a shell",
3233 errmsg(
"no output function available for type %s",
3258 if (!
pt->typisdefined)
3261 errmsg(
"type %s is only a shell",
3266 errmsg(
"no binary input function available for type %s",
3291 if (!
pt->typisdefined)
3294 errmsg(
"type %s is only a shell",
3299 errmsg(
"no binary output function available for type %s",
3473 stawidth = (*get_attavgwidth_hook) (relid,
attnum);
3559 if ((&stats->stakind1)[
i] ==
reqkind &&
3566 sslot->staop = (&stats->staop1)[
i];
3567 sslot->stacoll = (&stats->stacoll1)[
i];
3634 elog(
ERROR,
"stanumbers is not a 1-D float4 array");
3659 if (
sslot->values_arr)
3661 if (
sslot->numbers_arr)
3885 if (attno > rd_index->indnkeyatts)
3895 opclass =
indclass->values[attno - 1];
3919 result = rd_index->indisreplident;
3942 isvalid = rd_index->indisvalid;
3987 errmsg(
"publication \"%s\" does not exist", pubname)));
4009 elog(
ERROR,
"cache lookup failed for publication %u", pubid);
4059 elog(
ERROR,
"cache lookup failed for subscription %u", subid);
const IndexAmRoutine * GetIndexAmRoutineByAmId(Oid amoid, bool noerror)
StrategyNumber IndexAmTranslateCompareType(CompareType cmptype, Oid amoid, Oid opfamily, bool missing_ok)
CompareType IndexAmTranslateStrategy(StrategyNumber strategy, Oid amoid, Oid opfamily, bool missing_ok)
#define DatumGetArrayTypePCopy(X)
void deconstruct_array(const ArrayType *array, Oid elmtype, int elmlen, bool elmbyval, char elmalign, Datum **elemsp, bool **nullsp, int *nelemsp)
#define InvalidAttrNumber
void boot_get_type_io_data(Oid typid, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *typinput, Oid *typoutput, Oid *typcollation)
#define TextDatumGetCString(d)
#define Assert(condition)
#define OidIsValid(objectId)
memcpy(sums, checksumBaseOffsets, sizeof(checksumBaseOffsets))
Datum datumCopy(Datum value, bool typByVal, int typLen)
int errcode(int sqlerrcode)
#define ereport(elevel,...)
#define palloc_object(type)
Datum OidInputFunctionCall(Oid functionId, char *str, Oid typioparam, int32 typmod)
#define OidFunctionCall0(functionId)
#define HASHSTANDARD_PROC
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
List * lappend(List *list, void *datum)
List * lappend_oid(List *list, Oid datum)
bool list_member_oid(const List *list, Oid datum)
Oid get_range_subtype(Oid rangeOid)
char * get_rel_name(Oid relid)
void get_op_opfamily_properties(Oid opno, Oid opfamily, bool ordering_op, int *strategy, Oid *lefttype, Oid *righttype)
Oid get_func_variadictype(Oid funcid)
Oid get_opclass_method(Oid opclass)
bool get_compatible_hash_operators(Oid opno, Oid *lhs_opno, Oid *rhs_opno)
bool get_rel_relispartition(Oid relid)
char * get_propgraph_property_name(Oid propoid)
Oid get_op_opfamily_sortfamily(Oid opno, Oid opfamily)
bool collations_agree_on_equality(Oid coll1, Oid coll2)
char get_rel_persistence(Oid relid)
char get_func_prokind(Oid funcid)
bool get_index_isvalid(Oid index_oid)
Oid get_cast_oid(Oid sourcetypeid, Oid targettypeid, bool missing_ok)
RegProcedure get_range_constructor2(Oid rangeOid)
void getTypeBinaryOutputInfo(Oid type, Oid *typSend, bool *typIsVarlena)
AttrNumber get_attnum(Oid relid, const char *attname)
RegProcedure get_oprrest(Oid opno)
void free_attstatsslot(AttStatsSlot *sslot)
bool comparison_ops_are_compatible(Oid opno1, Oid opno2)
Oid get_constraint_index(Oid conoid)
bool get_func_retset(Oid funcid)
bool get_ordering_op_properties(Oid opno, Oid *opfamily, Oid *opcintype, CompareType *cmptype)
Oid get_element_type(Oid typid)
Oid get_opclass_input_type(Oid opclass)
bool type_is_rowtype(Oid typid)
bool type_is_range(Oid typid)
char func_parallel(Oid funcid)
Oid get_opclass_family(Oid opclass)
char get_attgenerated(Oid relid, AttrNumber attnum)
bool type_is_enum(Oid typid)
Oid get_multirange_range(Oid multirangeOid)
Oid get_typmodin(Oid typid)
Oid get_opfamily_member_for_cmptype(Oid opfamily, Oid lefttype, Oid righttype, CompareType cmptype)
char get_typstorage(Oid typid)
bool get_opclass_opfamily_and_input_type(Oid opclass, Oid *opfamily, Oid *opcintype)
RegProcedure get_func_support(Oid funcid)
char * get_database_name(Oid dbid)
void getTypeOutputInfo(Oid type, Oid *typOutput, bool *typIsVarlena)
bool get_typisdefined(Oid typid)
char * get_opname(Oid opno)
Datum get_attoptions(Oid relid, int16 attnum)
void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, char *typalign)
int32 get_attavgwidth(Oid relid, AttrNumber attnum)
bool get_index_isreplident(Oid index_oid)
Oid get_opfamily_proc(Oid opfamily, Oid lefttype, Oid righttype, int16 procnum)
RegProcedure get_oprjoin(Oid opno)
Oid get_equality_op_for_ordering_op(Oid opno, bool *reverse)
bool op_hashjoinable(Oid opno, Oid inputtype)
char get_rel_relkind(Oid relid)
void get_typlenbyval(Oid typid, int16 *typlen, bool *typbyval)
Oid get_func_signature(Oid funcid, Oid **argtypes, int *nargs)
Oid get_publication_oid(const char *pubname, bool missing_ok)
Oid get_rel_namespace(Oid relid)
static bool get_opmethod_canorder(Oid amoid)
RegProcedure get_opcode(Oid opno)
Oid get_typcollation(Oid typid)
Oid get_op_rettype(Oid opno)
int get_op_opfamily_strategy(Oid opno, Oid opfamily)
char * get_collation_name(Oid colloid)
Oid get_rel_type_id(Oid relid)
char * get_language_name(Oid langoid, bool missing_ok)
char * get_namespace_name_or_temp(Oid nspid)
void getTypeInputInfo(Oid type, Oid *typInput, Oid *typIOParam)
char func_volatile(Oid funcid)
bool equality_ops_are_compatible(Oid opno1, Oid opno2)
get_attavgwidth_hook_type get_attavgwidth_hook
bool op_is_safe_index_member(Oid opno)
bool get_index_isclustered(Oid index_oid)
Oid get_opfamily_member(Oid opfamily, Oid lefttype, Oid righttype, int16 strategy)
char * get_propgraph_label_name(Oid labeloid)
Oid get_ordering_op_for_equality_op(Oid opno, bool use_lhs_type)
Oid get_transform_tosql(Oid typid, Oid langid, List *trftypes)
bool func_strict(Oid funcid)
Oid get_index_column_opclass(Oid index_oid, int attno)
bool get_op_hash_functions_ext(Oid opno, Oid inputtype, RegProcedure *lhs_procno, RegProcedure *rhs_procno)
char * get_constraint_name(Oid conoid)
char * get_attname(Oid relid, AttrNumber attnum, bool missing_ok)
bool get_func_leakproof(Oid funcid)
const struct SubscriptRoutines * getSubscriptingRoutines(Oid typid, Oid *typelemp)
Node * get_typdefault(Oid typid)
bool get_collation_isdeterministic(Oid colloid)
List * get_op_index_interpretation(Oid opno)
Oid get_subscription_oid(const char *subname, bool missing_ok)
char * get_subscription_name(Oid subid, bool missing_ok)
Oid get_range_collation(Oid rangeOid)
char * get_opfamily_name(Oid opfid, bool missing_ok)
char * get_func_name(Oid funcid)
Oid get_range_multirange(Oid rangeOid)
Oid get_rel_relam(Oid relid)
char op_volatile(Oid opno)
Oid get_func_namespace(Oid funcid)
bool type_is_collatable(Oid typid)
Oid get_rel_tablespace(Oid relid)
int get_func_nargs(Oid funcid)
void get_type_io_data(Oid typid, IOFuncSelector which_func, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *func)
int16 get_typlen(Oid typid)
Oid get_typ_typrelid(Oid typid)
char get_typtype(Oid typid)
Oid get_base_element_type(Oid typid)
Oid getTypeIOParam(HeapTuple typeTuple)
Oid get_opfamily_method(Oid opfid)
Oid getBaseTypeAndTypmod(Oid typid, int32 *typmod)
char * get_qualified_objname(Oid nspid, char *objname)
Oid get_transform_fromsql(Oid typid, Oid langid, List *trftypes)
char * get_publication_name(Oid pubid, bool missing_ok)
Oid getBaseType(Oid typid)
bool get_op_hash_functions(Oid opno, RegProcedure *lhs_procno, RegProcedure *rhs_procno)
bool get_typbyval(Oid typid)
bool op_mergejoinable(Oid opno, Oid inputtype)
List * get_mergejoin_opfamilies(Oid opno)
char * get_namespace_name(Oid nspid)
Oid get_array_type(Oid typid)
Oid get_func_rettype(Oid funcid)
Oid get_promoted_array_type(Oid typid)
Oid get_atttype(Oid relid, AttrNumber attnum)
char get_constraint_type(Oid conoid)
int32 get_typavgwidth(Oid typid, int32 typmod)
bool op_in_opfamily(Oid opno, Oid opfamily)
RegProcedure get_typsubscript(Oid typid, Oid *typelemp)
void get_type_category_preferred(Oid typid, char *typcategory, bool *typispreferred)
bool get_attstatsslot(AttStatsSlot *sslot, HeapTuple statstuple, int reqkind, Oid reqop, int flags)
Oid get_relname_relid(const char *relname, Oid relnamespace)
Oid get_negator(Oid opno)
Oid get_commutator(Oid opno)
void op_input_types(Oid opno, Oid *lefttype, Oid *righttype)
bool type_is_multirange(Oid typid)
void getTypeBinaryInputInfo(Oid type, Oid *typReceive, Oid *typIOParam)
void get_atttypetypmodcoll(Oid relid, AttrNumber attnum, Oid *typid, int32 *typmod, Oid *collid)
#define ATTSTATSSLOT_NUMBERS
#define ATTSTATSSLOT_VALUES
int32(* get_attavgwidth_hook_type)(Oid relid, AttrNumber attnum)
Const * makeConst(Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval)
char * pstrdup(const char *in)
void pfree(void *pointer)
#define IsBootstrapProcessingMode()
bool isTempNamespace(Oid namespaceId)
END_CATALOG_STRUCT typedef FormData_pg_amop * Form_pg_amop
END_CATALOG_STRUCT typedef FormData_pg_amproc * Form_pg_amproc
FormData_pg_attribute * Form_pg_attribute
FormData_pg_class * Form_pg_class
END_CATALOG_STRUCT typedef FormData_pg_collation * Form_pg_collation
END_CATALOG_STRUCT typedef FormData_pg_constraint * Form_pg_constraint
END_CATALOG_STRUCT typedef FormData_pg_database * Form_pg_database
END_CATALOG_STRUCT typedef FormData_pg_index * Form_pg_index
END_CATALOG_STRUCT typedef FormData_pg_language * Form_pg_language
END_CATALOG_STRUCT typedef FormData_pg_namespace * Form_pg_namespace
END_CATALOG_STRUCT typedef FormData_pg_opclass * Form_pg_opclass
END_CATALOG_STRUCT typedef FormData_pg_operator * Form_pg_operator
END_CATALOG_STRUCT typedef FormData_pg_opfamily * Form_pg_opfamily
END_CATALOG_STRUCT typedef FormData_pg_proc * Form_pg_proc
END_CATALOG_STRUCT typedef FormData_pg_propgraph_label * Form_pg_propgraph_label
END_CATALOG_STRUCT typedef FormData_pg_propgraph_property * Form_pg_propgraph_property
END_CATALOG_STRUCT typedef FormData_pg_publication * Form_pg_publication
END_CATALOG_STRUCT typedef FormData_pg_range * Form_pg_range
#define STATISTIC_NUM_SLOTS
FormData_pg_statistic * Form_pg_statistic
END_CATALOG_STRUCT typedef FormData_pg_subscription * Form_pg_subscription
END_CATALOG_STRUCT typedef FormData_pg_type * Form_pg_type
static Datum Int16GetDatum(int16 X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static Datum CStringGetDatum(const char *X)
#define PointerGetDatum(X)
static Datum CharGetDatum(char X)
void * stringToNode(const char *str)
char * quote_qualified_identifier(const char *qualifier, const char *ident)
#define HTEqualStrategyNumber
bool amconsistentordering
bool amconsistentequality
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache2(SysCacheIdentifier cacheId, Datum key1, Datum key2)
HeapTuple SearchSysCache3(SysCacheIdentifier cacheId, Datum key1, Datum key2, Datum key3)
HeapTuple SearchSysCacheAttName(Oid relid, const char *attname)
Datum SysCacheGetAttrNotNull(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber)
HeapTuple SearchSysCache4(SysCacheIdentifier cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
HeapTuple SearchSysCache1(SysCacheIdentifier cacheId, Datum key1)
Datum SysCacheGetAttr(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
#define ReleaseSysCacheList(x)
#define SearchSysCacheList1(cacheId, key1)
#define SearchSysCacheExists3(cacheId, key1, key2, key3)
#define GetSysCacheOid1(cacheId, oidcol, key1)
#define GetSysCacheOid2(cacheId, oidcol, key1, key2)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)
#define TYPECACHE_CMP_PROC
#define TYPECACHE_HASH_PROC