848 #define SysCacheSize ((int) lengthof(cacheinfo))
862 static int oid_compare(
const void *a,
const void *b);
887 cacheinfo[cacheId].
reloid,
888 cacheinfo[cacheId].
indoid,
889 cacheinfo[cacheId].
nkeys,
890 cacheinfo[cacheId].
key,
893 elog(
ERROR,
"could not initialize cache %u (%d)",
894 cacheinfo[cacheId].reloid, cacheId);
897 cacheinfo[cacheId].
reloid;
899 cacheinfo[cacheId].
reloid;
901 cacheinfo[cacheId].
indoid;
917 SysCacheRelationOidSize = j + 1;
926 SysCacheSupportingRelOidSize = j + 1;
980 elog(
ERROR,
"invalid cache ID: %d", cacheId);
1164 elog(
ERROR,
"invalid cache ID: %d", cacheId);
1172 SysCache[cacheId]->cc_tupdesc,
1195 elog(
ERROR,
"invalid cache ID: %d", cacheId);
1209 elog(
ERROR,
"invalid cache ID: %d", cacheId);
1212 key1, key2, key3, key4);
1257 int middle = low + (high - low) / 2;
1282 int middle = low + (high - low) / 2;
1302 Oid oa = *((
const Oid *) a);
1303 Oid ob = *((
const Oid *) b);
1307 return (oa > ob) ? 1 : -1;
HeapTuple SearchSysCache(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
#define ConstraintOidIndexId
#define AttributeRelidNumIndexId
#define Anum_pg_event_trigger_evtname
HeapTuple heap_copytuple(HeapTuple tuple)
#define NamespaceOidIndexId
#define ProcedureOidIndexId
#define Anum_pg_attribute_attrelid
#define NamespaceRelationId
#define CollationOidIndexId
#define Anum_pg_opclass_opcmethod
static bool CacheInitialized
#define Anum_pg_operator_oprleft
bool RelationHasSysCache(Oid relid)
#define OperatorRelationId
#define Anum_pg_cast_casttarget
#define Anum_pg_ts_config_map_mapseqno
#define IndexRelidIndexId
#define Anum_pg_opfamily_opfmethod
#define Anum_pg_replication_origin_roident
static int SysCacheSupportingRelOidSize
#define SharedDependRelationId
struct catclist * SearchSysCacheList(int cacheId, int nkeys, Datum key1, Datum key2, Datum key3, Datum key4)
#define Anum_pg_user_mapping_umuser
#define Anum_pg_attribute_attnum
#define Anum_pg_statistic_stainherit
#define ObjectIdAttributeNumber
#define Anum_pg_user_mapping_umserver
#define RewriteRelRulenameIndexId
static Oid SysCacheSupportingRelOid[SysCacheSize *2]
#define ForeignServerNameIndexId
#define Anum_pg_type_typname
#define ProcedureRelationId
#define AuthMemRelationId
#define DatabaseRelationId
#define RelationRelationId
#define Anum_pg_conversion_contoencoding
#define CastSourceTargetIndexId
#define Anum_pg_opfamily_opfnamespace
#define OperatorClassRelationId
#define OperatorFamilyRelationId
#define Anum_pg_rewrite_ev_class
#define AttributeRelationId
#define Anum_pg_default_acl_defaclrole
#define Anum_pg_statistic_staattnum
#define ClassNameNspIndexId
static int SysCacheRelationOidSize
#define Anum_pg_amop_amoprighttype
#define Anum_pg_enum_enumlabel
#define Anum_pg_opfamily_opfname
#define EnumTypIdLabelIndexId
Oid GetSysCacheOid(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
#define Anum_pg_ts_config_map_maptokentype
#define Anum_pg_collation_collnamespace
#define Anum_pg_type_typnamespace
bool SearchSysCacheExistsAttName(Oid relid, const char *attname)
#define OpclassAmNameNspIndexId
#define DefaultAclRelationId
#define AccessMethodOperatorIndexId
#define Anum_pg_class_relnamespace
#define AggregateFnoidIndexId
#define AccessMethodOperatorRelationId
static const struct cachedesc cacheinfo[]
bool SearchSysCacheExists(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
#define AggregateRelationId
#define TSDictionaryOidIndexId
#define Anum_pg_amproc_amproclefttype
#define Anum_pg_foreign_server_srvname
#define Anum_pg_conversion_conforencoding
#define Anum_pg_cast_castsource
#define Anum_pg_rewrite_rulename
#define TSConfigRelationId
#define Anum_pg_opclass_opcnamespace
#define ForeignDataWrapperNameIndexId
#define LanguageNameIndexId
#define Anum_pg_replication_origin_roname
#define TSConfigMapRelationId
#define ReplicationOriginIdentIndex
#define ObjectIdGetDatum(X)
#define Anum_pg_aggregate_aggfnoid
#define TSDictionaryRelationId
#define Anum_pg_opclass_opcname
#define Anum_pg_ts_config_map_mapcfg
HeapTuple SearchSysCacheCopyAttName(Oid relid, const char *attname)
#define Anum_pg_amproc_amprocfamily
#define TablespaceOidIndexId
#define Anum_pg_ts_config_cfgnamespace
#define Anum_pg_class_relname
#define ConversionDefaultIndexId
#define AccessMethodRelationId
#define CStringGetDatum(X)
#define TransformOidIndexId
#define Anum_pg_amproc_amprocnum
#define DatabaseOidIndexId
FormData_pg_attribute * Form_pg_attribute
#define Anum_pg_foreign_data_wrapper_fdwname
#define OperatorNameNspIndexId
#define SharedDescriptionRelationId
#define Anum_pg_ts_template_tmplnamespace
#define Anum_pg_statistic_starelid
CatCache * InitCatCache(int id, Oid reloid, Oid indexoid, int nkeys, const int *key, int nbuckets)
#define Anum_pg_amproc_amprocrighttype
#define Anum_pg_amop_amoplefttype
#define Anum_pg_collation_collname
#define Anum_pg_operator_oprright
#define Anum_pg_language_lanname
#define TSConfigOidIndexId
#define Anum_pg_range_rngtypid
#define AuthMemRoleMemIndexId
#define heap_getattr(tup, attnum, tupleDesc, isnull)
#define SharedSecLabelRelationId
#define AccessMethodProcedureIndexId
#define Anum_pg_foreign_table_ftrelid
static CatCache * SysCache[SysCacheSize]
#define OpfamilyAmNameNspIndexId
#define OperatorOidIndexId
#define Anum_pg_auth_members_roleid
void ReleaseSysCache(HeapTuple tuple)
#define SecLabelRelationId
#define StatisticRelationId
Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
static Oid SysCacheRelationOid[SysCacheSize]
#define Anum_pg_amop_amoppurpose
#define TSParserRelationId
#define AttributeRelidNameIndexId
#define CollationRelationId
#define TSDictionaryNameNspIndexId
#define TypeNameNspIndexId
#define OpclassOidIndexId
void ReleaseCatCache(HeapTuple tuple)
#define RewriteRelationId
uint32 GetSysCacheHashValue(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
#define TSTemplateNameNspIndexId
#define Anum_pg_operator_oprname
#define ProcedureNameArgsNspIndexId
#define NamespaceNameIndexId
#define ForeignServerRelationId
#define LanguageOidIndexId
#define Anum_pg_proc_proargtypes
#define HeapTupleIsValid(tuple)
#define Assert(condition)
#define Anum_pg_proc_pronamespace
bool RelationInvalidatesSnapshotsOnly(Oid relid)
#define ForeignDataWrapperOidIndexId
#define EventTriggerRelationId
#define StatisticRelidAttnumInhIndexId
#define AuthMemMemRoleIndexId
#define EventTriggerOidIndexId
#define UserMappingOidIndexId
void pg_qsort(void *base, size_t nel, size_t elsize, int(*cmp)(const void *, const void *))
#define ConversionOidIndexId
#define UserMappingUserServerIndexId
#define ForeignDataWrapperRelationId
#define Anum_pg_ts_parser_prsnamespace
HeapTuple SearchSysCacheAttName(Oid relid, const char *attname)
#define TSParserOidIndexId
#define Anum_pg_conversion_conname
#define CollationNameEncNspIndexId
#define RangeTypidIndexId
#define EventTriggerNameIndexId
#define DescriptionRelationId
#define Anum_pg_default_acl_defaclnamespace
#define TableSpaceRelationId
#define DefaultAclRoleNspObjIndexId
#define Anum_pg_authid_rolname
#define Anum_pg_ts_dict_dictnamespace
#define Anum_pg_operator_oprnamespace
HeapTuple SearchSysCacheCopy(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
#define Anum_pg_ts_parser_prsname
#define Anum_pg_enum_enumtypid
void InitCatalogCache(void)
#define Anum_pg_default_acl_defaclobjtype
HeapTuple SearchCatCache(CatCache *cache, Datum v1, Datum v2, Datum v3, Datum v4)
static int oid_compare(const void *a, const void *b)
#define Anum_pg_am_amname
#define ReplicationOriginRelationId
#define Anum_pg_amop_amopopr
#define UserMappingRelationId
#define DbRoleSettingRelationId
CatCList * SearchCatCacheList(CatCache *cache, int nkeys, Datum v1, Datum v2, Datum v3, Datum v4)
#define ForeignTableRelationId
#define Anum_pg_amop_amopfamily
#define Anum_pg_collation_collencoding
#define AccessMethodStrategyIndexId
#define TSConfigMapIndexId
#define ConversionNameNspIndexId
#define LanguageRelationId
#define Anum_pg_ts_template_tmplname
#define Anum_pg_ts_dict_dictname
#define ConstraintRelationId
#define ReplicationOriginNameIndex
void InitCatCachePhase2(CatCache *cache, bool touch_index)
#define HeapTupleGetOid(tuple)
bool RelationSupportsSysCache(Oid relid)
uint32 GetCatCacheHashValue(CatCache *cache, Datum v1, Datum v2, Datum v3, Datum v4)
#define TSTemplateOidIndexId
#define Anum_pg_conversion_connamespace
#define Anum_pg_ts_config_cfgname
#define AuthIdRolnameIndexId
void InitCatalogCachePhase2(void)
#define AccessMethodProcedureRelationId
#define PointerIsValid(pointer)
#define ConversionRelationId
#define ForeignTableRelidIndexId
#define TSParserNameNspIndexId
#define TSConfigNameNspIndexId
#define TransformTypeLangIndexId
#define Anum_pg_attribute_attname
#define Anum_pg_index_indexrelid
#define ForeignServerOidIndexId
#define Anum_pg_namespace_nspname
#define Anum_pg_proc_proname
#define TSTemplateRelationId
#define OpfamilyOidIndexId
#define Anum_pg_amop_amopstrategy
#define Anum_pg_auth_members_member
#define SearchSysCache2(cacheId, key1, key2)