PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/htup_details.h"
#include "catalog/pg_db_role_setting_d.h"
#include "catalog/pg_depend_d.h"
#include "catalog/pg_description_d.h"
#include "catalog/pg_seclabel_d.h"
#include "catalog/pg_shdepend_d.h"
#include "catalog/pg_shdescription_d.h"
#include "catalog/pg_shseclabel_d.h"
#include "common/int.h"
#include "lib/qunique.h"
#include "miscadmin.h"
#include "storage/lmgr.h"
#include "utils/catcache.h"
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/syscache.h"
#include "catalog/syscache_info.h"
Go to the source code of this file.
Data Structures | |
struct | cachedesc |
Macros | |
#define | KEY(...) VA_ARGS_NARGS(__VA_ARGS__), { __VA_ARGS__ } |
Variables | |
static CatCache * | SysCache [SysCacheSize] |
static bool | CacheInitialized = false |
static Oid | SysCacheRelationOid [SysCacheSize] |
static int | SysCacheRelationOidSize |
static Oid | SysCacheSupportingRelOid [SysCacheSize *2] |
static int | SysCacheSupportingRelOidSize |
#define KEY | ( | ... | ) | VA_ARGS_NARGS(__VA_ARGS__), { __VA_ARGS__ } |
Definition at line 79 of file syscache.c.
Definition at line 655 of file syscache.c.
References elog, ERROR, GetCatCacheHashValue(), and SysCache.
Oid GetSysCacheOid | ( | int | cacheId, |
AttrNumber | oidcol, | ||
Datum | key1, | ||
Datum | key2, | ||
Datum | key3, | ||
Datum | key4 | ||
) |
Definition at line 443 of file syscache.c.
References Assert(), DatumGetObjectId(), heap_getattr(), HeapTupleIsValid, InvalidOid, ReleaseSysCache(), SearchSysCache(), and SysCache.
void InitCatalogCache | ( | void | ) |
Definition at line 110 of file syscache.c.
References Assert(), CacheInitialized, elog, ERROR, InitCatCache(), sort-test::key, lengthof, oid_compare(), OidIsValid, qsort, qunique(), RelationInvalidatesSnapshotsOnly(), SysCache, SysCacheRelationOid, SysCacheRelationOidSize, SysCacheSupportingRelOid, and SysCacheSupportingRelOidSize.
Referenced by InitPostgres().
void InitCatalogCachePhase2 | ( | void | ) |
Definition at line 180 of file syscache.c.
References Assert(), CacheInitialized, InitCatCachePhase2(), and SysCache.
Referenced by RelationCacheInitializePhase3().
|
static |
Definition at line 787 of file syscache.c.
References a, b, and pg_cmp_u32().
Referenced by InitCatalogCache().
bool RelationHasSysCache | ( | Oid | relid | ) |
Definition at line 737 of file syscache.c.
References SysCacheRelationOid, and SysCacheRelationOidSize.
Referenced by GetNonHistoricCatalogSnapshot().
bool RelationInvalidatesSnapshotsOnly | ( | Oid | relid | ) |
Definition at line 714 of file syscache.c.
Referenced by CacheInvalidateHeapTupleCommon(), GetNonHistoricCatalogSnapshot(), and InitCatalogCache().
bool RelationSupportsSysCache | ( | Oid | relid | ) |
Definition at line 762 of file syscache.c.
References SysCacheSupportingRelOid, and SysCacheSupportingRelOidSize.
Referenced by heap_update(), and RelationIdIsInInitFile().
void ReleaseSysCache | ( | HeapTuple | tuple | ) |
Definition at line 264 of file syscache.c.
References ReleaseCatCache().
Referenced by aclitemout(), add_cast_to(), add_function_cost(), AddEnumLabel(), AddRoleMems(), agg_args_support_sendreceive(), AggregateCreate(), AlterDomainValidateConstraint(), AlterEnum(), AlterObjectRename_internal(), AlterOpFamily(), AlterPublicationOptions(), AlterPublicationSchemas(), AlterPublicationTables(), AlterRole(), AlterRoleSet(), AlterSchemaOwner(), AlterSchemaOwner_oid(), AlterStatistics(), AlterTSConfiguration(), AlterTSDictionary(), AlterType(), AlterTypeOwner(), AlterTypeOwner_oid(), AlterTypeRecurse(), amvalidate(), appendFunctionName(), appendOrderBySuffix(), assignOperTypes(), assignProcTypes(), ATAddForeignKeyConstraint(), ATDetachCheckNoForeignKeyRefs(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecChangeOwner(), ATExecDropColumn(), ATExecSetExpression(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATPostAlterTypeCleanup(), ATPrepAlterColumnType(), AttachPartitionForeignKey(), attribute_statistics_update(), blvalidate(), brincostestimate(), brinvalidate(), btvalidate(), build_coercion_expression(), cached_function_compile(), CacheInvalidateRelcacheByRelid(), call_pltcl_start_proc(), CallStmtResultDesc(), check_amop_signature(), check_amproc_signature(), check_and_fetch_column_list(), check_default_text_search_config(), check_enable_rls(), check_for_column_name_collision(), check_object_ownership(), check_role(), check_session_authorization(), CheckFunctionValidatorAccess(), CheckIndexCompatible(), CheckMyDatabase(), CloneFkReferenced(), CloneFkReferencing(), coerce_type(), CollationIsVisibleExt(), compatible_oper(), compatible_oper_opid(), compile_plperl_function(), compile_pltcl_function(), compute_return_type(), ComputeIndexAttrs(), ComputePartitionAttrs(), ConstraintSetParentConstraint(), ConstructTupleDescriptor(), ConversionIsVisibleExt(), convert_column_name(), create_pg_locale(), create_pg_locale_builtin(), create_pg_locale_icu(), create_pg_locale_libc(), CreateCast(), CreateFunction(), CreateProceduralLanguage(), CreateRole(), CreateSchemaCommand(), CreateStatistics(), CreateTransform(), database_is_invalid_oid(), DefineCollation(), DefineDomain(), DefineIndex(), DefineOpClass(), DefineTSConfiguration(), DefineType(), delete_pg_statistic(), DeleteRelationTuple(), DeleteSequenceTuple(), deparseOpExpr(), deparseScalarArrayOpExpr(), DetachPartitionFinalize(), do_autovacuum(), do_setval(), DropObjectById(), DropRole(), DropSubscription(), enum_cmp_internal(), enum_in(), enum_out(), enum_recv(), enum_send(), errdatatype(), eval_const_expressions_mutator(), examine_attribute(), examine_indexcol_variable(), examine_simple_variable(), examine_variable(), ExecGrant_Attribute(), ExecGrant_common(), ExecGrant_Parameter(), ExecGrant_Relation(), ExecHashBuildSkewHash(), ExecInitAgg(), ExecuteCallStmt(), ExecuteDoStmt(), expand_all_col_privileges(), expand_vacuum_rel(), fetch_agg_sort_op(), fetch_fp_info(), fillTypeDesc(), find_coercion_pathway(), find_typmod_coercion_function(), fixup_whole_row_references(), flatten_reloptions(), fmgr_c_validator(), fmgr_info_cxt_security(), fmgr_info_other_lang(), fmgr_internal_validator(), fmgr_security_definer(), fmgr_sql_validator(), fmgr_symbol(), format_operator_extended(), format_operator_parts(), format_procedure_extended(), format_procedure_parts(), format_type_extended(), func_get_detail(), func_parallel(), func_strict(), func_volatile(), FuncNameAsType(), FunctionIsVisibleExt(), generate_collation_name(), generate_function_name(), generate_operator_clause(), generate_operator_name(), generate_partition_qual(), generate_qualified_relation_name(), generate_qualified_type_name(), generate_relation_name(), generateClonedExtStatsStmt(), generateClonedIndexStmt(), get_am_name(), get_am_type_oid(), get_array_type(), get_attavgwidth(), get_attgenerated(), get_attname(), get_attnum(), get_attoptions(), get_attr_stat_type(), get_attribute_options(), get_attstatsslot(), get_atttype(), get_atttypetypmodcoll(), get_base_element_type(), get_collation(), get_collation_isdeterministic(), get_collation_name(), get_commutator(), get_constraint_index(), get_constraint_name(), get_constraint_type(), get_database_name(), get_db_info(), get_default_acl_internal(), get_default_partition_oid(), get_element_type(), get_extension_name(), get_extension_schema(), get_func_leakproof(), get_func_name(), get_func_namespace(), get_func_nargs(), get_func_prokind(), get_func_result_name(), get_func_retset(), get_func_rettype(), get_func_signature(), get_func_support(), get_func_variadictype(), get_function_rows(), get_index_column_opclass(), get_index_isclustered(), get_index_isreplident(), get_index_isvalid(), get_language_name(), get_multirange_range(), get_namespace_name(), get_negator(), get_object_address_defacl(), get_object_address_opf_member(), get_object_address_type(), get_object_address_usermapping(), get_object_namespace(), get_op_opfamily_properties(), get_op_opfamily_sortfamily(), get_op_opfamily_strategy(), get_op_rettype(), get_opclass(), get_opclass_family(), get_opclass_input_type(), get_opclass_method(), get_opclass_name(), get_opclass_oid(), get_opclass_opfamily_and_input_type(), get_opcode(), get_opfamily_member(), get_opfamily_method(), get_opfamily_name(), get_opfamily_oid(), get_opfamily_proc(), get_opname(), get_oprjoin(), get_oprrest(), get_publication_name(), get_qual_for_range(), get_range_collation(), get_range_multirange(), get_range_subtype(), get_rel_name(), get_rel_namespace(), get_rel_persistence(), get_rel_relam(), get_rel_relispartition(), get_rel_relkind(), get_rel_tablespace(), get_rel_type_id(), get_relation_statistics(), get_relation_statistics_worker(), get_rewrite_oid(), get_ri_constraint_root(), get_role_password(), get_rolespec_name(), get_rte_attribute_is_dropped(), get_subscription_name(), get_tablespace(), get_transform_fromsql(), get_transform_tosql(), get_typ_typrelid(), get_typbyval(), get_typcollation(), get_typdefault(), get_type_category_preferred(), get_type_io_data(), get_typisdefined(), get_typlen(), get_typlenbyval(), get_typlenbyvalalign(), get_typmodin(), get_typstorage(), get_typsubscript(), get_typtype(), getBaseTypeAndTypmod(), GetFdwRoutineByServerId(), GetForeignColumnOptions(), GetForeignDataWrapperExtended(), GetForeignServerExtended(), GetForeignServerIdByRelId(), GetForeignTable(), GetIndexAmRoutineByAmId(), getObjectDescription(), getObjectIdentityParts(), getOpFamilyDescription(), getOpFamilyIdentity(), getProcedureTypeDescription(), GetPublication(), getPublicationSchemaInfo(), getRelationDescription(), getRelationIdentity(), getRelationTypeDescription(), GetSubscription(), GetSubscriptionRelState(), GetSysCacheOid(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserMapping(), GetUserNameFromId(), ginvalidate(), gistvalidate(), has_bypassrls_privilege(), has_createrole_privilege(), has_rolreplication(), has_subclass(), hash_ok_operator(), hashvalidate(), have_createdb_privilege(), heap_drop_with_catalog(), inclusion_get_strategy_procinfo(), index_check_primary_key(), index_concurrently_create_copy(), index_create(), index_drop(), index_get_partition(), indexam_property(), IndexGetRelation(), IndexSupportsBackwardScan(), init_database_collation(), initialize_peragg(), InitializeSessionUserId(), inline_set_returning_function(), InsertRule(), internal_get_result_type(), interpret_function_parameter_list(), IsBinaryCoercibleWithCast(), IsIndexUsableForFindingDeletedTuple(), load_domaintype_info(), load_rangetype_info(), logicalrep_write_tuple(), logicalrep_write_typ(), lookup_collation(), lookup_ts_config_cache(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), LookupTypeNameOid(), make_callstmt_target(), make_inh_translation_list(), make_new_heap(), make_op(), make_scalar_array_op(), map_sql_table_to_xmlschema(), map_sql_type_to_xml_name(), minmax_get_strategy_procinfo(), minmax_multi_get_strategy_procinfo(), nextval_internal(), object_aclmask_ext(), object_ownercheck(), op_hashjoinable(), op_input_types(), op_mergejoinable(), OpclassIsVisibleExt(), OperatorGet(), OperatorIsVisibleExt(), OpernameGetOprid(), OpfamilyIsVisibleExt(), ParseFuncOrColumn(), parseTypeString(), pg_attribute_aclcheck_all_ext(), pg_attribute_aclmask_ext(), pg_basetype(), pg_class_aclmask_ext(), pg_collation_actual_version(), pg_database_collation_actual_version(), pg_get_constraintdef_worker(), pg_get_function_arg_default(), pg_get_function_arguments(), pg_get_function_identity_arguments(), pg_get_function_result(), pg_get_function_sqlbody(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_statisticsobj_worker(), pg_get_statisticsobjdef_expressions(), pg_get_userbyid(), pg_namespace_aclmask_ext(), pg_nextoid(), pg_parameter_acl_aclmask(), pg_parameter_aclmask(), pg_relation_filenode(), pg_relation_filepath(), pg_relation_is_publishable(), pg_sequence_parameters(), pg_type_aclmask_ext(), pgoutput_row_filter_init(), plperl_validator(), plpgsql_build_datatype(), plpgsql_compile_callback(), plpgsql_parse_cwordtype(), plpgsql_validator(), plpython3_validator(), plsample_func_handler(), plsample_trigger_handler(), PLy_procedure_create(), PLy_procedure_get(), postgres_fdw_get_connections_internal(), prepare_column_cache(), preprocess_aggref(), preprocessNamespacePath(), print_function_arguments(), ProcedureCreate(), pub_rf_contains_invalid_column(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForAttachIndex(), RangeVarCallbackForDropRelation(), RangeVarCallbackForPolicy(), RangeVarCallbackForRenameAttribute(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackForTruncate(), RangeVarCallbackOwnsRelation(), recordExtObjInitPriv(), refresh_by_match_merge(), regclassout(), regcollationout(), regconfigout(), regdictionaryout(), regoperout(), regprocout(), regtypeout(), relation_statistics_update(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationBuildPublicationDesc(), RelationCacheInitializePhase3(), RelationClearMissing(), relationHasPrimaryKey(), RelationInitIndexAccessInfo(), RelationInitTableAccessMethod(), RelationIsVisibleExt(), RelationReloadIndexInfo(), RemoveConstraintById(), removeExtObjInitPriv(), RemoveFunctionById(), RemoveOperatorById(), RemovePartitionKeyByRelId(), RemovePublicationById(), RemovePublicationRelById(), RemovePublicationSchemaById(), RemoveRoleFromInitPriv(), RemoveRoleFromObjectPolicy(), RemoveStatisticsById(), RemoveStatisticsDataById(), RemoveTSConfigurationById(), RemoveTypeById(), rename_constraint_internal(), RenameConstraint(), RenameRole(), replorigin_by_name(), replorigin_by_oid(), replorigin_drop_by_name(), ResetSequence(), ResolveOpClass(), ri_GenerateQualCollation(), ri_LoadConstraintInfo(), roles_is_member_of(), SearchSysCacheAttName(), SearchSysCacheAttNum(), SearchSysCacheCopy(), SearchSysCacheCopyAttName(), SearchSysCacheCopyAttNum(), SearchSysCacheExists(), SearchSysCacheExistsAttName(), SearchSysCacheLocked1(), SearchSysCacheLockedCopy1(), sepgsql_proc_setattr(), sepgsql_relation_setattr(), sequence_options(), SetAttrMissing(), SetDefaultACL(), simplify_function(), spgvalidate(), SPI_gettype(), statext_dependencies_load(), statext_expressions_load(), statext_mcv_load(), statext_ndistinct_load(), StatisticsGetRelation(), StatisticsObjIsVisibleExt(), StoreAttrMissingVal(), superuser_arg(), transformCallStmt(), transformColumnDefinition(), transformColumnNameList(), transformColumnType(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformOfType(), triggered_change_notification(), tryAttachPartitionForeignKey(), TryReuseForeignKey(), TSConfigIsVisibleExt(), TSDictionaryIsVisibleExt(), TSParserIsVisibleExt(), TSTemplateIsVisibleExt(), TupleDescInitEntry(), typeidTypeRelid(), typeIsOfTypedTable(), TypeIsVisibleExt(), typenameTypeId(), typenameTypeIdAndMod(), typeOrDomainTypeRelid(), update_attstats(), validatePartitionedIndex(), and verify_dictoptions().
Definition at line 208 of file syscache.c.
References Assert(), SearchCatCache(), and SysCache.
Referenced by GetSysCacheOid(), SearchSysCacheCopy(), and SearchSysCacheExists().
Definition at line 220 of file syscache.c.
References Assert(), SearchCatCache1(), and SysCache.
Referenced by aclitemout(), add_cast_to(), add_function_cost(), AddRoleMems(), agg_args_support_sendreceive(), AggregateCreate(), AlterDomainValidateConstraint(), AlterEnum(), AlterObjectRename_internal(), AlterOpFamily(), AlterSchemaOwner(), AlterSchemaOwner_oid(), AlterStatistics(), AlterTSDictionary(), AlterTypeOwner_oid(), AlterTypeRecurse(), amvalidate(), appendFunctionName(), appendOrderBySuffix(), assignOperTypes(), assignProcTypes(), ATAddForeignKeyConstraint(), ATDetachCheckNoForeignKeyRefs(), ATExecAlterColumnGenericOptions(), ATExecAlterConstraint(), ATExecChangeOwner(), ATExecSetRelOptions(), ATPostAlterTypeCleanup(), AttachPartitionForeignKey(), blvalidate(), brinvalidate(), btvalidate(), build_coercion_expression(), cached_function_compile(), CacheInvalidateRelcacheByRelid(), call_pltcl_start_proc(), CallStmtResultDesc(), check_amop_signature(), check_amproc_signature(), check_default_text_search_config(), check_enable_rls(), check_object_ownership(), check_role(), check_session_authorization(), CheckFunctionValidatorAccess(), CheckIndexCompatible(), CheckMyDatabase(), CloneFkReferenced(), CloneFkReferencing(), CollationIsVisibleExt(), compile_plperl_function(), compile_pltcl_function(), ConstraintSetParentConstraint(), ConstructTupleDescriptor(), ConversionIsVisibleExt(), create_pg_locale(), create_pg_locale_builtin(), create_pg_locale_icu(), create_pg_locale_libc(), CreateCast(), CreateEventTrigger(), CreateFunction(), CreateProceduralLanguage(), CreateSchemaCommand(), CreateTransform(), database_is_invalid_oid(), DefineCollation(), DefineIndex(), DefineOpClass(), DefineTSConfiguration(), DeleteRelationTuple(), DeleteSequenceTuple(), deparseOpExpr(), deparseScalarArrayOpExpr(), DetachPartitionFinalize(), do_autovacuum(), do_setval(), DropObjectById(), DropRole(), enum_cmp_internal(), enum_out(), enum_send(), errdatatype(), eval_const_expressions_mutator(), ExecGrant_Parameter(), ExecInitAgg(), ExecuteCallStmt(), ExecuteDoStmt(), expand_vacuum_rel(), fetch_agg_sort_op(), fetch_fp_info(), fillTypeDesc(), fixup_whole_row_references(), flatten_reloptions(), fmgr_c_validator(), fmgr_info_cxt_security(), fmgr_info_other_lang(), fmgr_internal_validator(), fmgr_security_definer(), fmgr_sql_validator(), fmgr_symbol(), format_operator_extended(), format_operator_parts(), format_procedure_extended(), format_procedure_parts(), format_type_extended(), func_get_detail(), func_parallel(), func_strict(), func_volatile(), FunctionIsVisibleExt(), generate_collation_name(), generate_function_name(), generate_operator_clause(), generate_operator_name(), generate_partition_qual(), generate_qualified_relation_name(), generate_qualified_type_name(), generate_relation_name(), generateClonedExtStatsStmt(), generateClonedIndexStmt(), get_am_name(), get_am_type_oid(), get_array_type(), get_attstatsslot(), get_base_element_type(), get_collation(), get_collation_isdeterministic(), get_collation_name(), get_commutator(), get_constraint_index(), get_constraint_name(), get_constraint_type(), get_database_name(), get_db_info(), get_default_partition_oid(), get_element_type(), get_extension_name(), get_extension_schema(), get_func_leakproof(), get_func_name(), get_func_namespace(), get_func_nargs(), get_func_prokind(), get_func_result_name(), get_func_retset(), get_func_rettype(), get_func_signature(), get_func_support(), get_func_variadictype(), get_function_rows(), get_index_column_opclass(), get_index_isclustered(), get_index_isreplident(), get_index_isvalid(), get_language_name(), get_multirange_range(), get_namespace_name(), get_negator(), get_object_address_defacl(), get_object_address_usermapping(), get_object_namespace(), get_op_rettype(), get_opclass(), get_opclass_family(), get_opclass_input_type(), get_opclass_method(), get_opclass_name(), get_opclass_opfamily_and_input_type(), get_opcode(), get_opfamily_method(), get_opfamily_name(), get_opname(), get_oprjoin(), get_oprrest(), get_publication_name(), get_qual_for_range(), get_range_collation(), get_range_multirange(), get_range_subtype(), get_rel_name(), get_rel_namespace(), get_rel_persistence(), get_rel_relam(), get_rel_relispartition(), get_rel_relkind(), get_rel_tablespace(), get_rel_type_id(), get_relation_statistics(), get_ri_constraint_root(), get_role_password(), get_rolespec_tuple(), get_subscription_name(), get_tablespace(), get_typ_typrelid(), get_typbyval(), get_typcollation(), get_typdefault(), get_type_category_preferred(), get_type_io_data(), get_typisdefined(), get_typlen(), get_typlenbyval(), get_typlenbyvalalign(), get_typmodin(), get_typstorage(), get_typsubscript(), get_typtype(), getBaseTypeAndTypmod(), GetFdwRoutineByServerId(), GetForeignDataWrapperExtended(), GetForeignServerExtended(), GetForeignServerIdByRelId(), GetForeignTable(), GetIndexAmRoutineByAmId(), getObjectDescription(), getObjectIdentityParts(), getOpFamilyDescription(), getOpFamilyIdentity(), getProcedureTypeDescription(), GetPublication(), getPublicationSchemaInfo(), getRelationDescription(), getRelationIdentity(), getRelationTypeDescription(), GetSubscription(), GetTSConfigTuple(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserNameFromId(), ginvalidate(), gistvalidate(), has_bypassrls_privilege(), has_createrole_privilege(), has_rolreplication(), has_subclass(), hash_ok_operator(), hashvalidate(), have_createdb_privilege(), heap_drop_with_catalog(), index_concurrently_create_copy(), index_create(), index_drop(), index_get_partition(), indexam_property(), IndexGetRelation(), IndexSupportsBackwardScan(), init_database_collation(), initialize_peragg(), InitializeSessionUserId(), inline_set_returning_function(), internal_get_result_type(), IsIndexUsableForFindingDeletedTuple(), left_oper(), load_domaintype_info(), load_rangetype_info(), logicalrep_write_tuple(), logicalrep_write_typ(), lookup_ts_config_cache(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), LookupTypeNameExtended(), make_callstmt_target(), make_new_heap(), map_sql_table_to_xmlschema(), map_sql_type_to_xml_name(), nextval_internal(), object_aclmask_ext(), object_ownercheck(), op_hashjoinable(), op_input_types(), op_mergejoinable(), OpClassCacheLookup(), OpclassIsVisibleExt(), oper(), OperatorIsVisibleExt(), OpFamilyCacheLookup(), OpfamilyIsVisibleExt(), ParseFuncOrColumn(), pg_attribute_aclcheck_all_ext(), pg_attribute_aclmask_ext(), pg_basetype(), pg_class_aclmask_ext(), pg_collation_actual_version(), pg_database_collation_actual_version(), pg_get_constraintdef_worker(), pg_get_function_arg_default(), pg_get_function_arguments(), pg_get_function_identity_arguments(), pg_get_function_result(), pg_get_function_sqlbody(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_statisticsobj_worker(), pg_get_statisticsobjdef_expressions(), pg_get_userbyid(), pg_namespace_aclmask_ext(), pg_parameter_acl_aclmask(), pg_parameter_aclmask(), pg_relation_filenode(), pg_relation_filepath(), pg_relation_is_publishable(), pg_sequence_parameters(), pg_type_aclmask_ext(), plperl_validator(), plpgsql_build_datatype(), plpgsql_compile_callback(), plpgsql_parse_cwordtype(), plpgsql_validator(), plpython3_validator(), plsample_func_handler(), plsample_trigger_handler(), PLy_procedure_create(), PLy_procedure_get(), postgres_fdw_get_connections_internal(), prepare_column_cache(), preprocess_aggref(), preprocessNamespacePath(), print_function_arguments(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForAttachIndex(), RangeVarCallbackForDropRelation(), RangeVarCallbackForPolicy(), RangeVarCallbackForRenameAttribute(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackForTruncate(), RangeVarCallbackOwnsRelation(), recordExtObjInitPriv(), refresh_by_match_merge(), regclassout(), regcollationout(), regconfigout(), regdictionaryout(), regoperout(), regprocout(), regtypeout(), relation_statistics_update(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationBuildPublicationDesc(), RelationCacheInitializePhase3(), relationHasPrimaryKey(), RelationInitIndexAccessInfo(), RelationInitTableAccessMethod(), RelationIsVisibleExt(), RelationReloadIndexInfo(), RemoveConstraintById(), removeExtObjInitPriv(), RemoveFunctionById(), RemoveOperatorById(), RemovePartitionKeyByRelId(), RemovePublicationById(), RemovePublicationRelById(), RemovePublicationSchemaById(), RemoveRoleFromInitPriv(), RemoveRoleFromObjectPolicy(), RemoveStatisticsById(), RemoveTSConfigurationById(), RemoveTypeById(), rename_constraint_internal(), RenameConstraint(), RenameRole(), replorigin_by_name(), replorigin_by_oid(), replorigin_drop_by_name(), ResetSequence(), ResolveOpClass(), ri_GenerateQualCollation(), ri_LoadConstraintInfo(), roles_is_member_of(), SearchSysCacheLocked1(), sepgsql_proc_setattr(), sepgsql_relation_setattr(), sequence_options(), simplify_function(), spgvalidate(), SPI_gettype(), StatisticsGetRelation(), StatisticsObjIsVisibleExt(), superuser_arg(), transformCallStmt(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), triggered_change_notification(), tryAttachPartitionForeignKey(), TryReuseForeignKey(), TSConfigIsVisibleExt(), TSDictionaryIsVisibleExt(), TSParserIsVisibleExt(), TSTemplateIsVisibleExt(), TupleDescInitEntry(), typeidType(), typeidTypeRelid(), typeIsOfTypedTable(), TypeIsVisibleExt(), typeOrDomainTypeRelid(), validatePartitionedIndex(), verify_dictoptions(), and WinCheckAndInitializeNullTreatment().
Definition at line 230 of file syscache.c.
References Assert(), SearchCatCache2(), and SysCache.
Referenced by AddEnumLabel(), AlterPublicationOptions(), AlterPublicationSchemas(), AlterPublicationTables(), CastCreate(), check_and_fetch_column_list(), check_for_column_name_collision(), convert_column_name(), CreateTransform(), DropSubscription(), enum_in(), enum_recv(), examine_attribute(), ExecGrant_Attribute(), expand_all_col_privileges(), find_coercion_pathway(), find_typmod_coercion_function(), fixup_whole_row_references(), get_attgenerated(), get_attname(), get_attoptions(), get_attr_stat_type(), get_attribute_options(), get_atttype(), get_atttypetypmodcoll(), get_object_address_usermapping(), get_relation_statistics_worker(), get_rewrite_oid(), get_rte_attribute_is_dropped(), get_transform_fromsql(), get_transform_tosql(), GetForeignColumnOptions(), GetSubscriptionRelState(), GetUserMapping(), index_check_primary_key(), index_concurrently_create_copy(), InsertRule(), IsBinaryCoercibleWithCast(), pg_attribute_aclcheck_all_ext(), pg_attribute_aclmask_ext(), pgoutput_row_filter_init(), pub_rf_contains_invalid_column(), recordExtObjInitPriv(), RelationClearMissing(), removeExtObjInitPriv(), RemoveStatisticsDataById(), SearchSysCacheAttName(), SearchSysCacheAttNum(), statext_dependencies_load(), statext_expressions_load(), statext_mcv_load(), statext_ndistinct_load(), and StoreAttrMissingVal().
Definition at line 240 of file syscache.c.
References Assert(), SearchCatCache3(), and SysCache.
Referenced by AddRoleMems(), attribute_statistics_update(), brincostestimate(), DefineOpClass(), delete_pg_statistic(), examine_indexcol_variable(), examine_simple_variable(), examine_variable(), ExecHashBuildSkewHash(), get_attavgwidth(), get_default_acl_internal(), get_object_address_defacl(), get_op_opfamily_properties(), get_op_opfamily_sortfamily(), get_op_opfamily_strategy(), lookup_collation(), OpClassCacheLookup(), OpFamilyCacheLookup(), ProcedureCreate(), ResolveOpClass(), SetDefaultACL(), and update_attstats().
Definition at line 250 of file syscache.c.
References Assert(), SearchCatCache4(), and SysCache.
Referenced by get_object_address_opf_member(), get_opfamily_member(), get_opfamily_proc(), inclusion_get_strategy_procinfo(), minmax_get_strategy_procinfo(), minmax_multi_get_strategy_procinfo(), OperatorGet(), and OpernameGetOprid().
Definition at line 475 of file syscache.c.
References attname, CStringGetDatum(), GETSTRUCT(), HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache2().
Referenced by ATExecAlterColumnGenericOptions(), ATExecDropColumn(), ATExecSetExpression(), ATExecSetOptions(), ATExecSetStatistics(), ATPrepAlterColumnType(), ComputeIndexAttrs(), ComputePartitionAttrs(), CreateStatistics(), get_attnum(), make_inh_translation_list(), pg_nextoid(), plpgsql_parse_cwordtype(), SearchSysCacheCopyAttName(), SearchSysCacheExistsAttName(), SetAttrMissing(), and transformColumnNameList().
Definition at line 538 of file syscache.c.
References attnum, GETSTRUCT(), HeapTupleIsValid, Int16GetDatum(), ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache2().
Referenced by ATExecSetStatistics(), and SearchSysCacheCopyAttNum().
Definition at line 374 of file syscache.c.
References heap_copytuple(), HeapTupleIsValid, ReleaseSysCache(), and SearchSysCache().
Definition at line 498 of file syscache.c.
References attname, heap_copytuple(), HeapTupleIsValid, ReleaseSysCache(), and SearchSysCacheAttName().
Referenced by ATExecAddColumn(), ATExecAddIdentity(), ATExecAlterColumnType(), ATExecDropColumn(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropNotNull(), ATExecSetCompression(), ATExecSetIdentity(), ATExecSetStorage(), ATPrepDropExpression(), MergeAttributesIntoExisting(), and renameatt_internal().
Definition at line 561 of file syscache.c.
References attnum, heap_copytuple(), HeapTupleIsValid, ReleaseSysCache(), and SearchSysCacheAttNum().
Referenced by dropconstraint_internal(), pg_get_acl(), set_attnotnull(), and SetIndexStorageProperties().
Definition at line 420 of file syscache.c.
References HeapTupleIsValid, ReleaseSysCache(), and SearchSysCache().
bool SearchSysCacheExistsAttName | ( | Oid | relid, |
const char * | attname | ||
) |
Definition at line 517 of file syscache.c.
References attname, HeapTupleIsValid, ReleaseSysCache(), and SearchSysCacheAttName().
Referenced by attribute_statistics_update(), and RemoveInheritance().
Definition at line 671 of file syscache.c.
References elog, ERROR, catclist::nkeys, SearchCatCacheList(), and SysCache.
Definition at line 282 of file syscache.c.
References AcceptInvalidationMessages(), catcache::cc_relisshared, catcache::cc_reloid, HeapTupleIsValid, InplaceUpdateTupleLock, InvalidOid, ItemPointerEquals(), ItemPointerGetBlockNumber(), ItemPointerGetOffsetNumber(), ItemPointerIsValid(), ItemPointerSetInvalid(), LockAcquire(), LockRelease(), MyDatabaseId, ReleaseSysCache(), SearchSysCache1(), SET_LOCKTAG_TUPLE, SysCache, and HeapTupleData::t_self.
Referenced by ATExecSetRelOptions(), ExecGrant_common(), ExecGrant_Relation(), and SearchSysCacheLockedCopy1().
Definition at line 399 of file syscache.c.
References heap_copytuple(), HeapTupleIsValid, ReleaseSysCache(), and SearchSysCacheLocked1().
Referenced by AlterRelationNamespaceInternal(), get_catalog_object_by_oid_extended(), RelationSetNewRelfilenumber(), RenameDatabase(), RenameRelationInternal(), SetDatabaseHasLoginEventTriggers(), SetRelationTableSpace(), and update_relispartition().
StaticAssertDecl | ( | lengthof(cacheinfo) | = =SysCacheSize , |
"SysCacheSize does not match syscache.c's array" | |||
) |
Datum SysCacheGetAttr | ( | int | cacheId, |
HeapTuple | tup, | ||
AttrNumber | attributeNumber, | ||
bool * | isNull | ||
) |
Definition at line 595 of file syscache.c.
References Assert(), elog, ERROR, heap_getattr(), InitCatCachePhase2(), and SysCache.
Referenced by AlterCollation(), AlterForeignDataWrapper(), AlterForeignServer(), AlterFunction(), AlterPublicationTables(), AlterRole(), AlterSchemaOwner_internal(), AlterTSDictionary(), AlterUserMapping(), ATExecAlterColumnGenericOptions(), ATExecChangeOwner(), ATExecGenericOptions(), ATExecSetOptions(), ATExecSetRelOptions(), build_function_result_tupdesc_t(), check_and_fetch_column_list(), CheckMyDatabase(), compile_plperl_function(), create_pg_locale(), create_pg_locale_icu(), DeconstructFkConstraintRow(), DefineCollation(), DefineDomain(), DropSubscription(), examine_attribute(), ExecGrant_Attribute(), ExecGrant_common(), ExecGrant_Parameter(), ExecGrant_Relation(), ExecInitAgg(), expand_function_arguments(), fetch_statentries_for_relation(), flatten_reloptions(), fmgr_security_definer(), fmgr_sql_validator(), FuncnameGetCandidates(), generate_partition_qual(), generateClonedExtStatsStmt(), generateClonedIndexStmt(), get_attoptions(), get_attribute_options(), get_db_info(), get_default_acl_internal(), get_func_arg_info(), get_func_trftypes(), get_relation_statistics(), get_role_password(), get_tablespace(), get_typdefault(), GetForeignColumnOptions(), GetForeignDataWrapperExtended(), GetForeignServerExtended(), GetForeignTable(), GetSubscription(), GetSubscriptionRelations(), GetSubscriptionRelState(), GetUserMapping(), index_concurrently_create_copy(), initialize_peragg(), inline_function(), inline_set_returning_function(), lookup_ts_dictionary_cache(), make_new_heap(), MatchNamedCall(), object_aclmask_ext(), pg_attribute_aclcheck_all_ext(), pg_attribute_aclmask_ext(), pg_class_aclmask_ext(), pg_get_acl(), pg_get_constraintdef_worker(), pg_get_function_arg_default(), pg_get_function_sqlbody(), pg_get_functiondef(), pg_get_publication_tables(), pg_namespace_aclmask_ext(), pg_parameter_acl_aclmask(), pg_parameter_aclmask(), pg_type_aclmask_ext(), pgoutput_row_filter_init(), plsample_func_handler(), plsample_trigger_handler(), PLy_procedure_create(), prepare_sql_fn_parse_info(), preprocess_aggref(), print_function_arguments(), ProcedureCreate(), pub_rf_contains_invalid_column(), recordExtObjInitPriv(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), SetDefaultACL(), sql_compile_callback(), statext_dependencies_load(), statext_expressions_load(), statext_mcv_load(), statext_ndistinct_load(), StorePartitionBound(), SysCacheGetAttrNotNull(), and transformCallStmt().
Datum SysCacheGetAttrNotNull | ( | int | cacheId, |
HeapTuple | tup, | ||
AttrNumber | attributeNumber | ||
) |
Definition at line 625 of file syscache.c.
References attname, elog, ERROR, get_rel_name(), NameStr, SysCache, SysCacheGetAttr(), and TupleDescAttr().
Referenced by AlterCollation(), AlterDomainValidateConstraint(), build_function_result_tupdesc_t(), build_replindex_scan_key(), CheckIndexCompatible(), CheckMyDatabase(), compile_plperl_function(), compile_pltcl_function(), create_pg_locale(), create_pg_locale_builtin(), create_pg_locale_icu(), create_pg_locale_libc(), DeconstructFkConstraintRow(), DropSubscription(), ExecGrant_common(), ExecGrant_Parameter(), extractNotNullColumn(), fetch_function_defaults(), fetch_statentries_for_relation(), fmgr_c_validator(), fmgr_info_C_lang(), fmgr_info_cxt_security(), fmgr_internal_validator(), fmgr_sql_validator(), fmgr_symbol(), func_get_detail(), generateClonedExtStatsStmt(), generateClonedIndexStmt(), get_attstatsslot(), get_db_info(), get_func_result_name(), get_index_column_opclass(), get_object_namespace(), get_qual_for_range(), getObjectDescription(), getObjectIdentityParts(), GetSubscription(), inclusion_get_strategy_procinfo(), index_concurrently_create_copy(), index_opclass_options(), inline_function(), inline_set_returning_function(), IsIndexUsableForReplicaIdentityFull(), minmax_get_strategy_procinfo(), minmax_multi_get_strategy_procinfo(), object_aclmask_ext(), object_ownercheck(), pg_collation_actual_version(), pg_database_collation_actual_version(), pg_get_constraintdef_worker(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_statisticsobj_worker(), pg_get_statisticsobjdef_expressions(), plpgsql_compile_callback(), PLy_procedure_create(), print_function_sqlbody(), ProcedureCreate(), QueueCheckConstraintValidation(), refresh_by_match_merge(), RelationBuildPartitionKey(), RemoveRoleFromInitPriv(), sql_compile_callback(), test_indoption(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformIndexConstraint(), and TryReuseForeignKey().
void SysCacheInvalidate | ( | int | cacheId, |
uint32 | hashValue | ||
) |
Definition at line 690 of file syscache.c.
References CatCacheInvalidate(), elog, ERROR, and SysCache.
Referenced by LocalExecuteInvalidationMessage().
|
static |
Definition at line 88 of file syscache.c.
Referenced by InitCatalogCache(), and InitCatalogCachePhase2().
|
static |
Definition at line 86 of file syscache.c.
Referenced by GetSysCacheHashValue(), GetSysCacheOid(), InitCatalogCache(), InitCatalogCachePhase2(), SearchSysCache(), SearchSysCache1(), SearchSysCache2(), SearchSysCache3(), SearchSysCache4(), SearchSysCacheList(), SearchSysCacheLocked1(), SysCacheGetAttr(), SysCacheGetAttrNotNull(), and SysCacheInvalidate().
|
static |
Definition at line 91 of file syscache.c.
Referenced by InitCatalogCache(), and RelationHasSysCache().
|
static |
Definition at line 92 of file syscache.c.
Referenced by InitCatalogCache(), and RelationHasSysCache().
|
static |
Definition at line 95 of file syscache.c.
Referenced by InitCatalogCache(), and RelationSupportsSysCache().
|
static |
Definition at line 96 of file syscache.c.
Referenced by InitCatalogCache(), and RelationSupportsSysCache().