#include "access/attnum.h"
#include "access/htup.h"
Go to the source code of this file.
Defines | |
#define | SearchSysCache1(cacheId, key1) SearchSysCache(cacheId, key1, 0, 0, 0) |
#define | SearchSysCache2(cacheId, key1, key2) SearchSysCache(cacheId, key1, key2, 0, 0) |
#define | SearchSysCache3(cacheId, key1, key2, key3) SearchSysCache(cacheId, key1, key2, key3, 0) |
#define | SearchSysCache4(cacheId, key1, key2, key3, key4) SearchSysCache(cacheId, key1, key2, key3, key4) |
#define | SearchSysCacheCopy1(cacheId, key1) SearchSysCacheCopy(cacheId, key1, 0, 0, 0) |
#define | SearchSysCacheCopy2(cacheId, key1, key2) SearchSysCacheCopy(cacheId, key1, key2, 0, 0) |
#define | SearchSysCacheCopy3(cacheId, key1, key2, key3) SearchSysCacheCopy(cacheId, key1, key2, key3, 0) |
#define | SearchSysCacheCopy4(cacheId, key1, key2, key3, key4) SearchSysCacheCopy(cacheId, key1, key2, key3, key4) |
#define | SearchSysCacheExists1(cacheId, key1) SearchSysCacheExists(cacheId, key1, 0, 0, 0) |
#define | SearchSysCacheExists2(cacheId, key1, key2) SearchSysCacheExists(cacheId, key1, key2, 0, 0) |
#define | SearchSysCacheExists3(cacheId, key1, key2, key3) SearchSysCacheExists(cacheId, key1, key2, key3, 0) |
#define | SearchSysCacheExists4(cacheId, key1, key2, key3, key4) SearchSysCacheExists(cacheId, key1, key2, key3, key4) |
#define | GetSysCacheOid1(cacheId, key1) GetSysCacheOid(cacheId, key1, 0, 0, 0) |
#define | GetSysCacheOid2(cacheId, key1, key2) GetSysCacheOid(cacheId, key1, key2, 0, 0) |
#define | GetSysCacheOid3(cacheId, key1, key2, key3) GetSysCacheOid(cacheId, key1, key2, key3, 0) |
#define | GetSysCacheOid4(cacheId, key1, key2, key3, key4) GetSysCacheOid(cacheId, key1, key2, key3, key4) |
#define | GetSysCacheHashValue1(cacheId, key1) GetSysCacheHashValue(cacheId, key1, 0, 0, 0) |
#define | GetSysCacheHashValue2(cacheId, key1, key2) GetSysCacheHashValue(cacheId, key1, key2, 0, 0) |
#define | GetSysCacheHashValue3(cacheId, key1, key2, key3) GetSysCacheHashValue(cacheId, key1, key2, key3, 0) |
#define | GetSysCacheHashValue4(cacheId, key1, key2, key3, key4) GetSysCacheHashValue(cacheId, key1, key2, key3, key4) |
#define | SearchSysCacheList1(cacheId, key1) SearchSysCacheList(cacheId, 1, key1, 0, 0, 0) |
#define | SearchSysCacheList2(cacheId, key1, key2) SearchSysCacheList(cacheId, 2, key1, key2, 0, 0) |
#define | SearchSysCacheList3(cacheId, key1, key2, key3) SearchSysCacheList(cacheId, 3, key1, key2, key3, 0) |
#define | SearchSysCacheList4(cacheId, key1, key2, key3, key4) SearchSysCacheList(cacheId, 4, key1, key2, key3, key4) |
#define | ReleaseSysCacheList(x) ReleaseCatCacheList(x) |
Enumerations | |
enum | SysCacheIdentifier { AGGFNOID = 0, AMNAME, AMOID, AMOPOPID, AMOPSTRATEGY, AMPROCNUM, ATTNAME, ATTNUM, AUTHMEMMEMROLE, AUTHMEMROLEMEM, AUTHNAME, AUTHOID, CASTSOURCETARGET, CLAAMNAMENSP, CLAOID, COLLNAMEENCNSP, COLLOID, CONDEFAULT, CONNAMENSP, CONSTROID, CONVOID, DATABASEOID, DEFACLROLENSPOBJ, ENUMOID, ENUMTYPOIDNAME, EVENTTRIGGERNAME, EVENTTRIGGEROID, FOREIGNDATAWRAPPERNAME, FOREIGNDATAWRAPPEROID, FOREIGNSERVERNAME, FOREIGNSERVEROID, FOREIGNTABLEREL, INDEXRELID, LANGNAME, LANGOID, NAMESPACENAME, NAMESPACEOID, OPERNAMENSP, OPEROID, OPFAMILYAMNAMENSP, OPFAMILYOID, PROCNAMEARGSNSP, PROCOID, RANGETYPE, RELNAMENSP, RELOID, RULERELNAME, STATRELATTINH, TABLESPACEOID, TSCONFIGMAP, TSCONFIGNAMENSP, TSCONFIGOID, TSDICTNAMENSP, TSDICTOID, TSPARSERNAMENSP, TSPARSEROID, TSTEMPLATENAMENSP, TSTEMPLATEOID, TYPENAMENSP, TYPEOID, USERMAPPINGOID, USERMAPPINGUSERSERVER } |
Functions | |
void | InitCatalogCache (void) |
void | InitCatalogCachePhase2 (void) |
HeapTuple | SearchSysCache (int cacheId, Datum key1, Datum key2, Datum key3, Datum key4) |
void | ReleaseSysCache (HeapTuple tuple) |
HeapTuple | SearchSysCacheCopy (int cacheId, Datum key1, Datum key2, Datum key3, Datum key4) |
bool | SearchSysCacheExists (int cacheId, Datum key1, Datum key2, Datum key3, Datum key4) |
Oid | GetSysCacheOid (int cacheId, Datum key1, Datum key2, Datum key3, Datum key4) |
HeapTuple | SearchSysCacheAttName (Oid relid, const char *attname) |
HeapTuple | SearchSysCacheCopyAttName (Oid relid, const char *attname) |
bool | SearchSysCacheExistsAttName (Oid relid, const char *attname) |
Datum | SysCacheGetAttr (int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull) |
uint32 | GetSysCacheHashValue (int cacheId, Datum key1, Datum key2, Datum key3, Datum key4) |
struct catclist * | SearchSysCacheList (int cacheId, int nkeys, Datum key1, Datum key2, Datum key3, Datum key4) |
#define GetSysCacheHashValue1 | ( | cacheId, | ||
key1 | ||||
) | GetSysCacheHashValue(cacheId, key1, 0, 0, 0) |
Definition at line 169 of file syscache.h.
Referenced by record_plan_function_dependency(), and ri_LoadConstraintInfo().
#define GetSysCacheHashValue2 | ( | cacheId, | ||
key1, | ||||
key2 | ||||
) | GetSysCacheHashValue(cacheId, key1, key2, 0, 0) |
Definition at line 171 of file syscache.h.
#define GetSysCacheHashValue3 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3 | ||||
) | GetSysCacheHashValue(cacheId, key1, key2, key3, 0) |
Definition at line 173 of file syscache.h.
#define GetSysCacheHashValue4 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3, | ||||
key4 | ||||
) | GetSysCacheHashValue(cacheId, key1, key2, key3, key4) |
Definition at line 175 of file syscache.h.
#define GetSysCacheOid1 | ( | cacheId, | ||
key1 | ||||
) | GetSysCacheOid(cacheId, key1, 0, 0, 0) |
Definition at line 160 of file syscache.h.
Referenced by get_am_oid(), get_event_trigger_oid(), get_foreign_data_wrapper_oid(), get_foreign_server_oid(), get_language_oid(), get_namespace_oid(), and get_role_oid().
#define GetSysCacheOid2 | ( | cacheId, | ||
key1, | ||||
key2 | ||||
) | GetSysCacheOid(cacheId, key1, key2, 0, 0) |
Definition at line 162 of file syscache.h.
Referenced by AlterUserMapping(), ConversionGetConid(), CreateUserMapping(), DefineCompositeType(), DefineDomain(), DefineEnum(), DefineRange(), DefineType(), get_cast_oid(), get_conversion_oid(), get_relname_relid(), get_ts_config_oid(), get_ts_dict_oid(), get_ts_parser_oid(), get_ts_template_oid(), heap_create_with_catalog(), LookupTypeName(), RemoveUserMapping(), and TypenameGetTypid().
#define GetSysCacheOid3 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3 | ||||
) | GetSysCacheOid(cacheId, key1, key2, key3, 0) |
Definition at line 164 of file syscache.h.
Referenced by CollationGetCollid(), get_collation_oid(), OpclassnameGetOpcid(), and OpfamilynameGetOpfid().
#define GetSysCacheOid4 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3, | ||||
key4 | ||||
) | GetSysCacheOid(cacheId, key1, key2, key3, key4) |
Definition at line 166 of file syscache.h.
Referenced by dropOperators(), and dropProcedures().
#define ReleaseSysCacheList | ( | x | ) | ReleaseCatCacheList(x) |
Definition at line 187 of file syscache.h.
Referenced by equality_ops_are_compatible(), FindDefaultConversion(), FuncnameGetCandidates(), get_compatible_hash_operators(), get_mergejoin_opfamilies(), get_op_btree_interpretation(), get_op_hash_functions(), get_ordering_op_for_equality_op(), get_ordering_op_properties(), is_admin_of_role(), OpernameGetCandidates(), OpernameGetOprid(), roles_has_privs_of(), and roles_is_member_of().
#define SearchSysCache1 | ( | cacheId, | ||
key1 | ||||
) | SearchSysCache(cacheId, key1, 0, 0, 0) |
Definition at line 133 of file syscache.h.
Referenced by aclitemout(), AggregateCreate(), AlterDomainValidateConstraint(), AlterEnum(), AlterObjectRename_internal(), AlterOpFamily(), AlterRole(), AlterRoleSet(), AlterSchemaOwner(), AlterSchemaOwner_oid(), AlterTSDictionary(), assignOperTypes(), assignProcTypes(), ATAddForeignKeyConstraint(), ATExecAlterColumnGenericOptions(), ATExecChangeOwner(), ATExecDropNotNull(), ATExecSetRelOptions(), build_coercion_expression(), CacheInvalidateRelcacheByRelid(), check_role(), check_session_authorization(), check_TSCurrentConfig(), CheckIndexCompatible(), CheckMyDatabase(), CheckRelationOwnership(), cluster(), cluster_rel(), CollationIsVisible(), compile_plperl_function(), compile_pltcl_function(), ComputeIndexAttrs(), ConstructTupleDescriptor(), ConversionIsVisible(), count_agg_clauses_walker(), create_proc_lang(), CreateCast(), CreateEventTrigger(), CreateFunction(), DefineCollation(), DefineIndex(), DefineOpClass(), DefineTSConfiguration(), DeleteRelationTuple(), deparseFuncExpr(), deparseOpExpr(), deparseScalarArrayOpExpr(), do_autovacuum(), do_compile(), dropdb(), DropProceduralLanguageById(), DropRole(), enum_cmp_internal(), enum_out(), enum_send(), errdatatype(), ExecGrant_Database(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Namespace(), ExecGrant_Relation(), ExecGrant_Tablespace(), ExecGrant_Type(), ExecInitAgg(), ExecuteDoStmt(), fetch_agg_sort_op(), fetch_fp_info(), 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(), format_operator_internal(), format_procedure_internal(), format_type_internal(), func_get_detail(), func_strict(), func_volatile(), FunctionIsVisible(), generate_collation_name(), generate_function_name(), generate_operator_name(), generate_relation_name(), generateClonedIndexStmt(), get_am_name(), get_array_type(), get_attstatsslot(), get_base_element_type(), get_collation(), get_collation_name(), get_commutator(), get_constraint_name(), get_database_name(), get_db_info(), get_element_type(), get_func_cost(), get_func_leakproof(), get_func_name(), get_func_namespace(), get_func_nargs(), get_func_result_name(), get_func_retset(), get_func_rettype(), get_func_rows(), get_func_signature(), get_namespace_name(), get_negator(), get_object_namespace(), get_opclass(), get_opclass_family(), get_opclass_input_type(), get_opclass_name(), get_opcode(), get_oper_expr(), get_opname(), get_oprjoin(), get_oprrest(), get_range_subtype(), get_rel_name(), get_rel_namespace(), get_rel_relkind(), get_rel_tablespace(), get_rel_type_id(), 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_typtype(), getBaseTypeAndTypmod(), GetDomainConstraints(), GetFdwRoutineByRelId(), GetForeignDataWrapper(), GetForeignServer(), GetForeignTable(), GetIndexOpClass(), getObjectDescription(), getObjectIdentity(), getOpFamilyDescription(), getOpFamilyIdentity(), getProcedureTypeDescription(), getRelationDescription(), getRelationIdentity(), getRelationTypeDescription(), GetTSConfigTuple(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserNameFromId(), has_createrole_privilege(), has_rolcatupdate(), has_rolinherit(), has_rolreplication(), has_subclass(), hash_ok_operator(), have_createdb_privilege(), heap_drop_with_catalog(), index_drop(), IndexGetRelation(), IndexSupportsBackwardScan(), init_sql_fcache(), initialize_peragg(), InitializeSessionUserId(), inline_set_returning_function(), internal_get_result_type(), left_oper(), load_rangetype_info(), lookup_collation_cache(), lookup_ts_config_cache(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), LookupAggNameTypeNames(), LookupTypeName(), make_new_heap(), map_sql_table_to_xmlschema(), map_sql_type_to_xml_name(), mark_index_clustered(), md5_crypt_verify(), op_hashjoinable(), op_input_types(), op_mergejoinable(), OpClassCacheLookup(), OpclassIsVisible(), oper(), OperatorIsVisible(), OpFamilyCacheLookup(), OpfamilyIsVisible(), pg_attribute_aclcheck_all(), pg_attribute_aclmask(), pg_class_aclmask(), pg_class_ownercheck(), pg_collation_ownercheck(), pg_conversion_ownercheck(), pg_database_aclmask(), pg_database_ownercheck(), pg_event_trigger_ownercheck(), pg_foreign_data_wrapper_aclmask(), pg_foreign_data_wrapper_ownercheck(), pg_foreign_server_aclmask(), pg_foreign_server_ownercheck(), pg_get_constraintdef_worker(), pg_get_function_arguments(), pg_get_function_identity_arguments(), pg_get_function_result(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_serial_sequence(), pg_get_userbyid(), pg_language_aclmask(), pg_language_ownercheck(), pg_namespace_aclmask(), pg_namespace_ownercheck(), pg_newlocale_from_collation(), pg_opclass_ownercheck(), pg_oper_ownercheck(), pg_opfamily_ownercheck(), pg_proc_aclmask(), pg_proc_ownercheck(), pg_relation_filenode(), pg_relation_filepath(), pg_tablespace_aclmask(), pg_tablespace_ownercheck(), pg_ts_config_ownercheck(), pg_ts_dict_ownercheck(), pg_type_aclmask(), pg_type_ownercheck(), plperl_validator(), plpgsql_build_datatype(), plpgsql_compile(), plpgsql_parse_cwordtype(), plpgsql_validator(), plpython_validator(), pltcl_build_tuple_argument(), pltcl_set_tuple_values(), pltcl_trigger_handler(), PLy_input_tuple_funcs(), PLy_output_tuple_funcs(), PLy_procedure_argument_valid(), PLy_procedure_create(), PLy_procedure_get(), PLy_spi_prepare(), PLyString_ToComposite(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForDropRelation(), RangeVarCallbackForRenameAttribute(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), recomputeNamespacePath(), regclassout(), regconfigout(), regdictionaryout(), regoperout(), regprocout(), regtypeout(), RelationCacheInitializePhase3(), relationHasPrimaryKey(), RelationInitIndexAccessInfo(), RelationIsVisible(), RelationReloadIndexInfo(), RemoveConstraintById(), RemoveEventTriggerById(), RemoveForeignDataWrapperById(), RemoveForeignServerById(), RemoveFunctionById(), RemoveObjects(), RemoveOpClassById(), RemoveOperatorById(), RemoveOpFamilyById(), RemoveSchemaById(), RemoveTSConfigurationById(), RemoveTSDictionaryById(), RemoveTSParserById(), RemoveTSTemplateById(), RemoveTypeById(), RemoveUserMappingById(), rename_constraint_internal(), RenameConstraint(), RenameRole(), ri_add_cast_to(), ri_GenerateQual(), ri_GenerateQualCollation(), ri_LoadConstraintInfo(), right_oper(), sepgsql_proc_setattr(), sepgsql_relation_setattr(), simplify_function(), SPI_gettype(), superuser_arg(), transformArrayType(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), triggered_change_notification(), TryReuseForeignKey(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), TSTemplateIsVisible(), TupleDescInitEntry(), typeidType(), typeidTypeRelid(), typeIsOfTypedTable(), TypeIsVisible(), and verify_dictoptions().
#define SearchSysCache2 | ( | cacheId, | ||
key1, | ||||
key2 | ||||
) | SearchSysCache(cacheId, key1, key2, 0, 0) |
Definition at line 135 of file syscache.h.
Referenced by AddEnumLabel(), AddRoleMems(), array_to_json_internal(), check_for_column_name_collision(), column_privilege_check(), composite_to_json(), CreateCast(), DelRoleMems(), enum_in(), enum_recv(), ExecGrant_Attribute(), expand_all_col_privileges(), find_coercion_pathway(), find_typmod_coercion_function(), fixup_whole_row_references(), get_attname(), get_attribute_options(), get_atttype(), get_atttypetypmodcoll(), get_atttypmod(), get_rewrite_oid(), get_rte_attribute_is_dropped(), get_rte_attribute_type(), GetForeignColumnOptions(), GetUserMapping(), index_check_primary_key(), InsertRule(), IsBinaryCoercible(), json_agg_transfn(), pg_attribute_aclcheck_all(), pg_attribute_aclmask(), SearchSysCacheAttName(), and to_json().
#define SearchSysCache3 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3 | ||||
) | SearchSysCache(cacheId, key1, key2, key3, 0) |
Definition at line 137 of file syscache.h.
Referenced by btcostestimate(), DefineOpClass(), examine_simple_variable(), examine_variable(), ExecHashBuildSkewHash(), get_attavgwidth(), get_default_acl_internal(), get_op_opfamily_properties(), get_op_opfamily_sortfamily(), get_op_opfamily_strategy(), GetIndexOpClass(), OpClassCacheLookup(), OpFamilyCacheLookup(), ProcedureCreate(), SetDefaultACL(), and update_attstats().
#define SearchSysCache4 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3, | ||||
key4 | ||||
) | SearchSysCache(cacheId, key1, key2, key3, key4) |
Definition at line 139 of file syscache.h.
Referenced by get_opfamily_member(), get_opfamily_proc(), OperatorGet(), and OpernameGetOprid().
#define SearchSysCacheCopy1 | ( | cacheId, | ||
key1 | ||||
) | SearchSysCacheCopy(cacheId, key1, 0, 0, 0) |
Definition at line 142 of file syscache.h.
Referenced by AlterDomainAddConstraint(), AlterDomainDefault(), AlterDomainDropConstraint(), AlterDomainNotNull(), AlterEventTrigger(), AlterEventTriggerOwner(), AlterEventTriggerOwner_oid(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner(), AlterForeignDataWrapperOwner_oid(), AlterForeignServer(), AlterForeignServerOwner(), AlterForeignServerOwner_oid(), AlterFunction(), AlterObjectNamespace_internal(), AlterRelationNamespaceInternal(), AlterTypeNamespaceInternal(), AlterTypeOwnerInternal(), AlterUserMapping(), ATExecAddColumn(), ATExecAddOf(), ATExecDropColumn(), ATExecDropOf(), ATExecGenericOptions(), ATExecSetTableSpace(), create_toast_table(), CreateTrigger(), DefineQueryRewrite(), examine_attribute(), get_catalog_object_by_oid(), index_build(), index_constraint_create(), index_set_state_flags(), index_update_stats(), mark_index_clustered(), OperatorCreate(), OperatorUpd(), reindex_index(), RelationSetNewRelfilenode(), RemoveConstraintById(), RenameConstraintById(), RenameDatabase(), RenameRelationInternal(), RenameSchema(), RenameType(), RenameTypeInternal(), SetFunctionArgType(), SetFunctionReturnType(), SetRelationHasSubclass(), SetRelationNumChecks(), SetRelationRuleStatus(), swap_relation_files(), table_recheck_autovac(), vac_update_datfrozenxid(), and vac_update_relstats().
#define SearchSysCacheCopy2 | ( | cacheId, | ||
key1, | ||||
key2 | ||||
) | SearchSysCacheCopy(cacheId, key1, key2, 0, 0) |
Definition at line 144 of file syscache.h.
Referenced by EnableDisableRule(), RemoveAttrDefaultById(), RemoveAttributeById(), RenameRewriteRule(), StoreAttrDefault(), and TypeCreate().
#define SearchSysCacheCopy3 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3 | ||||
) | SearchSysCacheCopy(cacheId, key1, key2, key3, 0) |
Definition at line 146 of file syscache.h.
#define SearchSysCacheCopy4 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3, | ||||
key4 | ||||
) | SearchSysCacheCopy(cacheId, key1, key2, key3, key4) |
Definition at line 148 of file syscache.h.
#define SearchSysCacheExists1 | ( | cacheId, | ||
key1 | ||||
) | SearchSysCacheExists(cacheId, key1, 0, 0, 0) |
Definition at line 151 of file syscache.h.
Referenced by AlterObjectRename_internal(), cluster_rel(), column_privilege_check(), CreateSchemaCommand(), find_expr_references_walker(), find_inheritance_children(), ForceTransactionIdLimitUpdate(), has_any_column_privilege_id(), has_any_column_privilege_id_id(), has_any_column_privilege_name_id(), has_database_privilege_id(), has_database_privilege_id_id(), has_database_privilege_name_id(), has_function_privilege_id(), has_function_privilege_id_id(), has_function_privilege_name_id(), has_language_privilege_id(), has_language_privilege_id_id(), has_language_privilege_name_id(), has_schema_privilege_id(), has_schema_privilege_id_id(), has_schema_privilege_name_id(), has_table_privilege_id(), has_table_privilege_id_id(), has_table_privilege_name_id(), has_type_privilege_id(), has_type_privilege_id_id(), has_type_privilege_name_id(), lastval(), LockTableRecurse(), NamespaceCreate(), pg_collation_is_visible(), pg_conversion_is_visible(), pg_do_encoding_conversion(), pg_function_is_visible(), pg_opclass_is_visible(), pg_operator_is_visible(), pg_opfamily_is_visible(), pg_table_is_visible(), pg_ts_config_is_visible(), pg_ts_dict_is_visible(), pg_ts_parser_is_visible(), pg_ts_template_is_visible(), pg_type_is_visible(), RenameRole(), shdepLockAndCheckObject(), and try_relation_open().
#define SearchSysCacheExists2 | ( | cacheId, | ||
key1, | ||||
key2 | ||||
) | SearchSysCacheExists(cacheId, key1, key2, 0, 0) |
Definition at line 153 of file syscache.h.
Referenced by AlterObjectNamespace_internal(), AlterObjectRename_internal(), AlterTypeNamespaceInternal(), ConversionCreate(), IsDefinedRewriteRule(), makeArrayTypeName(), RenameTypeInternal(), scanRTEForColumn(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), TSTemplateIsVisible(), and TypeIsVisible().
#define SearchSysCacheExists3 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3 | ||||
) | SearchSysCacheExists(cacheId, key1, key2, key3, 0) |
Definition at line 155 of file syscache.h.
Referenced by CollationCreate(), CreateOpFamily(), DefineOpClass(), IsThereCollationInNamespace(), IsThereFunctionInNamespace(), IsThereOpClassInNamespace(), IsThereOpFamilyInNamespace(), and op_in_opfamily().
#define SearchSysCacheExists4 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3, | ||||
key4 | ||||
) | SearchSysCacheExists(cacheId, key1, key2, key3, key4) |
Definition at line 157 of file syscache.h.
Referenced by storeOperators(), and storeProcedures().
#define SearchSysCacheList1 | ( | cacheId, | ||
key1 | ||||
) | SearchSysCacheList(cacheId, 1, key1, 0, 0, 0) |
Definition at line 178 of file syscache.h.
Referenced by AddEnumLabel(), equality_ops_are_compatible(), FuncnameGetCandidates(), get_compatible_hash_operators(), get_mergejoin_opfamilies(), get_op_btree_interpretation(), get_op_hash_functions(), get_ordering_op_for_equality_op(), get_ordering_op_properties(), is_admin_of_role(), OpernameGetCandidates(), roles_has_privs_of(), roles_is_member_of(), and sepgsql_relation_drop().
#define SearchSysCacheList2 | ( | cacheId, | ||
key1, | ||||
key2 | ||||
) | SearchSysCacheList(cacheId, 2, key1, key2, 0, 0) |
Definition at line 180 of file syscache.h.
#define SearchSysCacheList3 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3 | ||||
) | SearchSysCacheList(cacheId, 3, key1, key2, key3, 0) |
Definition at line 182 of file syscache.h.
Referenced by FindDefaultConversion(), and OpernameGetOprid().
#define SearchSysCacheList4 | ( | cacheId, | ||
key1, | ||||
key2, | ||||
key3, | ||||
key4 | ||||
) | SearchSysCacheList(cacheId, 4, key1, key2, key3, key4) |
Definition at line 184 of file syscache.h.
enum SysCacheIdentifier |
Definition at line 32 of file syscache.h.
{ AGGFNOID = 0, AMNAME, AMOID, AMOPOPID, AMOPSTRATEGY, AMPROCNUM, ATTNAME, ATTNUM, AUTHMEMMEMROLE, AUTHMEMROLEMEM, AUTHNAME, AUTHOID, CASTSOURCETARGET, CLAAMNAMENSP, CLAOID, COLLNAMEENCNSP, COLLOID, CONDEFAULT, CONNAMENSP, CONSTROID, CONVOID, DATABASEOID, DEFACLROLENSPOBJ, ENUMOID, ENUMTYPOIDNAME, EVENTTRIGGERNAME, EVENTTRIGGEROID, FOREIGNDATAWRAPPERNAME, FOREIGNDATAWRAPPEROID, FOREIGNSERVERNAME, FOREIGNSERVEROID, FOREIGNTABLEREL, INDEXRELID, LANGNAME, LANGOID, NAMESPACENAME, NAMESPACEOID, OPERNAMENSP, OPEROID, OPFAMILYAMNAMENSP, OPFAMILYOID, PROCNAMEARGSNSP, PROCOID, RANGETYPE, RELNAMENSP, RELOID, RULERELNAME, STATRELATTINH, TABLESPACEOID, TSCONFIGMAP, TSCONFIGNAMENSP, TSCONFIGOID, TSDICTNAMENSP, TSDICTOID, TSPARSERNAMENSP, TSPARSEROID, TSTEMPLATENAMENSP, TSTEMPLATEOID, TYPENAMENSP, TYPEOID, USERMAPPINGOID, USERMAPPINGUSERSERVER };
Definition at line 1089 of file syscache.c.
References elog, ERROR, GetCatCacheHashValue(), PointerIsValid, and SysCacheSize.
{ if (cacheId < 0 || cacheId >= SysCacheSize || !PointerIsValid(SysCache[cacheId])) elog(ERROR, "invalid cache ID: %d", cacheId); return GetCatCacheHashValue(SysCache[cacheId], key1, key2, key3, key4); }
Definition at line 953 of file syscache.c.
References HeapTupleGetOid, HeapTupleIsValid, ReleaseSysCache(), and SearchSysCache().
{ HeapTuple tuple; Oid result; tuple = SearchSysCache(cacheId, key1, key2, key3, key4); if (!HeapTupleIsValid(tuple)) return InvalidOid; result = HeapTupleGetOid(tuple); ReleaseSysCache(tuple); return result; }
void InitCatalogCache | ( | void | ) |
Definition at line 809 of file syscache.c.
References Assert, CacheInitialized, elog, ERROR, cachedesc::indoid, InitCatCache(), cachedesc::key, MemSet, cachedesc::nbuckets, cachedesc::nkeys, PointerIsValid, cachedesc::reloid, and SysCacheSize.
Referenced by InitPostgres().
{ int cacheId; Assert(!CacheInitialized); MemSet(SysCache, 0, sizeof(SysCache)); for (cacheId = 0; cacheId < SysCacheSize; cacheId++) { SysCache[cacheId] = InitCatCache(cacheId, cacheinfo[cacheId].reloid, cacheinfo[cacheId].indoid, cacheinfo[cacheId].nkeys, cacheinfo[cacheId].key, cacheinfo[cacheId].nbuckets); if (!PointerIsValid(SysCache[cacheId])) elog(ERROR, "could not initialize cache %u (%d)", cacheinfo[cacheId].reloid, cacheId); } CacheInitialized = true; }
void InitCatalogCachePhase2 | ( | void | ) |
Definition at line 846 of file syscache.c.
References Assert, CacheInitialized, InitCatCachePhase2(), and SysCacheSize.
Referenced by RelationCacheInitializePhase3().
{ int cacheId; Assert(CacheInitialized); for (cacheId = 0; cacheId < SysCacheSize; cacheId++) InitCatCachePhase2(SysCache[cacheId], true); }
void ReleaseSysCache | ( | HeapTuple | tuple | ) |
Definition at line 892 of file syscache.c.
References ReleaseCatCache().
Referenced by aclitemout(), AddEnumLabel(), AddRoleMems(), AggregateCreate(), AlterDomainValidateConstraint(), AlterEnum(), AlterObjectRename_internal(), AlterOpFamily(), AlterRole(), AlterRoleSet(), AlterSchemaOwner(), AlterSchemaOwner_oid(), AlterTSConfiguration(), AlterTSDictionary(), AlterTypeOwner(), array_to_json_internal(), assignOperTypes(), assignProcTypes(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecChangeOwner(), ATExecDropColumn(), ATExecDropNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATPrepAlterColumnType(), build_coercion_expression(), CacheInvalidateRelcacheByRelid(), check_for_column_name_collision(), check_role(), check_session_authorization(), check_TSCurrentConfig(), CheckIndexCompatible(), CheckMyDatabase(), CheckRelationOwnership(), cluster(), cluster_rel(), coerce_type(), CollationIsVisible(), column_privilege_check(), compatible_oper(), compatible_oper_opid(), compile_plperl_function(), compile_pltcl_function(), composite_to_json(), compute_return_type(), ComputeIndexAttrs(), ConstructTupleDescriptor(), ConversionIsVisible(), count_agg_clauses_walker(), create_proc_lang(), CreateCast(), CreateFunction(), DefineCollation(), DefineDomain(), DefineIndex(), DefineOpClass(), DefineTSConfiguration(), DefineType(), DeleteRelationTuple(), DelRoleMems(), deparseFuncExpr(), deparseOpExpr(), deparseScalarArrayOpExpr(), do_autovacuum(), do_compile(), dropdb(), DropProceduralLanguageById(), DropRole(), enum_cmp_internal(), enum_in(), enum_out(), enum_recv(), enum_send(), errdatatype(), examine_parameter_list(), ExecGrant_Attribute(), ExecGrant_Database(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Namespace(), ExecGrant_Relation(), ExecGrant_Tablespace(), ExecGrant_Type(), ExecHashBuildSkewHash(), ExecInitAgg(), ExecuteDoStmt(), expand_all_col_privileges(), fetch_agg_sort_op(), fetch_fp_info(), 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(), format_operator_internal(), format_procedure_internal(), format_type_internal(), func_get_detail(), func_strict(), func_volatile(), FuncNameAsType(), FunctionIsVisible(), generate_collation_name(), generate_function_name(), generate_operator_name(), generate_relation_name(), generateClonedIndexStmt(), get_am_name(), get_array_type(), get_attavgwidth(), get_attname(), get_attnum(), get_attribute_options(), get_attstatsslot(), get_atttype(), get_atttypetypmodcoll(), get_atttypmod(), get_base_element_type(), get_collation(), get_collation_name(), get_commutator(), get_constraint_name(), get_database_name(), get_db_info(), get_default_acl_internal(), get_element_type(), get_func_cost(), get_func_leakproof(), get_func_name(), get_func_namespace(), get_func_nargs(), get_func_result_name(), get_func_retset(), get_func_rettype(), get_func_rows(), get_func_signature(), get_namespace_name(), get_negator(), get_object_address_type(), get_object_namespace(), get_op_opfamily_properties(), get_op_opfamily_sortfamily(), get_op_opfamily_strategy(), get_opclass(), get_opclass_family(), get_opclass_input_type(), get_opclass_name(), get_opclass_oid(), get_opcode(), get_oper_expr(), get_opfamily_member(), get_opfamily_oid(), get_opfamily_proc(), get_opname(), get_oprjoin(), get_oprrest(), get_range_subtype(), get_rel_name(), get_rel_namespace(), get_rel_relkind(), get_rel_tablespace(), get_rel_type_id(), get_rewrite_oid(), get_rte_attribute_is_dropped(), get_rte_attribute_type(), 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_typtype(), getBaseTypeAndTypmod(), GetDomainConstraints(), GetFdwRoutineByRelId(), GetForeignColumnOptions(), GetForeignDataWrapper(), GetForeignServer(), GetForeignTable(), GetIndexOpClass(), getObjectDescription(), getObjectIdentity(), getOpFamilyDescription(), getOpFamilyIdentity(), getProcedureTypeDescription(), getRelationDescription(), getRelationIdentity(), getRelationTypeDescription(), GetSysCacheOid(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserMapping(), GetUserNameFromId(), has_createrole_privilege(), has_rolcatupdate(), has_rolinherit(), has_rolreplication(), has_subclass(), hash_ok_operator(), have_createdb_privilege(), heap_drop_with_catalog(), index_check_primary_key(), index_drop(), IndexGetRelation(), IndexSupportsBackwardScan(), init_sql_fcache(), initialize_peragg(), InitializeSessionUserId(), inline_set_returning_function(), InsertRule(), internal_get_result_type(), IsBinaryCoercible(), json_agg_transfn(), load_rangetype_info(), lookup_collation_cache(), lookup_ts_config_cache(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), LookupAggNameTypeNames(), LookupTypeNameOid(), make_new_heap(), make_op(), make_scalar_array_op(), map_sql_table_to_xmlschema(), map_sql_type_to_xml_name(), mark_index_clustered(), md5_crypt_verify(), op_hashjoinable(), op_input_types(), op_mergejoinable(), OpclassIsVisible(), OperatorGet(), OperatorIsVisible(), OpernameGetOprid(), OpfamilyIsVisible(), pg_attribute_aclcheck_all(), pg_attribute_aclmask(), pg_class_aclmask(), pg_class_ownercheck(), pg_collation_ownercheck(), pg_conversion_ownercheck(), pg_database_aclmask(), pg_database_ownercheck(), pg_event_trigger_ownercheck(), pg_foreign_data_wrapper_aclmask(), pg_foreign_data_wrapper_ownercheck(), pg_foreign_server_aclmask(), pg_foreign_server_ownercheck(), pg_get_constraintdef_worker(), pg_get_function_arguments(), pg_get_function_identity_arguments(), pg_get_function_result(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_serial_sequence(), pg_get_userbyid(), pg_language_aclmask(), pg_language_ownercheck(), pg_namespace_aclmask(), pg_namespace_ownercheck(), pg_newlocale_from_collation(), pg_opclass_ownercheck(), pg_oper_ownercheck(), pg_opfamily_ownercheck(), pg_proc_aclmask(), pg_proc_ownercheck(), pg_relation_filenode(), pg_relation_filepath(), pg_tablespace_aclmask(), pg_tablespace_ownercheck(), pg_ts_config_ownercheck(), pg_ts_dict_ownercheck(), pg_type_aclmask(), pg_type_ownercheck(), plperl_validator(), plpgsql_build_datatype(), plpgsql_compile(), plpgsql_parse_cwordtype(), plpgsql_parse_wordtype(), plpgsql_validator(), plpython_validator(), pltcl_build_tuple_argument(), pltcl_set_tuple_values(), pltcl_trigger_handler(), PLy_input_tuple_funcs(), PLy_output_tuple_funcs(), PLy_procedure_argument_valid(), PLy_procedure_create(), PLy_procedure_get(), PLy_spi_prepare(), PLyString_ToComposite(), ProcedureCreate(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForDropRelation(), RangeVarCallbackForRenameAttribute(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), recomputeNamespacePath(), regclassout(), regconfigout(), regdictionaryout(), regoperout(), regprocout(), regtypeout(), RelationCacheInitializePhase3(), relationHasPrimaryKey(), RelationInitIndexAccessInfo(), RelationIsVisible(), RelationReloadIndexInfo(), RemoveConstraintById(), RemoveEventTriggerById(), RemoveForeignDataWrapperById(), RemoveForeignServerById(), RemoveFunctionById(), RemoveObjects(), RemoveOpClassById(), RemoveOperatorById(), RemoveOpFamilyById(), RemoveSchemaById(), RemoveTSConfigurationById(), RemoveTSDictionaryById(), RemoveTSParserById(), RemoveTSTemplateById(), RemoveTypeById(), RemoveUserMappingById(), rename_constraint_internal(), RenameConstraint(), RenameRole(), ri_add_cast_to(), ri_GenerateQual(), ri_GenerateQualCollation(), ri_LoadConstraintInfo(), SearchSysCacheAttName(), SearchSysCacheCopy(), SearchSysCacheCopyAttName(), SearchSysCacheExists(), SearchSysCacheExistsAttName(), sepgsql_proc_setattr(), sepgsql_relation_setattr(), SetDefaultACL(), simplify_function(), SPI_gettype(), superuser_arg(), to_json(), transformArrayType(), transformColumnNameList(), transformColumnType(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformOfType(), triggered_change_notification(), TryReuseForeignKey(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), TSTemplateIsVisible(), TupleDescInitEntry(), typeidTypeRelid(), typeIsOfTypedTable(), TypeIsVisible(), typenameTypeId(), typenameTypeIdAndMod(), update_attstats(), and verify_dictoptions().
{ ReleaseCatCache(tuple); }
Definition at line 874 of file syscache.c.
References elog, ERROR, PointerIsValid, SearchCatCache(), and SysCacheSize.
Referenced by GetSysCacheOid(), SearchSysCacheCopy(), and SearchSysCacheExists().
{ if (cacheId < 0 || cacheId >= SysCacheSize || !PointerIsValid(SysCache[cacheId])) elog(ERROR, "invalid cache ID: %d", cacheId); return SearchCatCache(SysCache[cacheId], key1, key2, key3, key4); }
Definition at line 980 of file syscache.c.
References ATTNAME, CStringGetDatum, GETSTRUCT, HeapTupleIsValid, ObjectIdGetDatum, ReleaseSysCache(), and SearchSysCache2.
Referenced by ATExecAlterColumnGenericOptions(), ATExecDropColumn(), ATExecSetOptions(), ATPrepAlterColumnType(), ComputeIndexAttrs(), get_attnum(), plpgsql_parse_cwordtype(), SearchSysCacheCopyAttName(), SearchSysCacheExistsAttName(), and transformColumnNameList().
{ HeapTuple tuple; tuple = SearchSysCache2(ATTNAME, ObjectIdGetDatum(relid), CStringGetDatum(attname)); if (!HeapTupleIsValid(tuple)) return NULL; if (((Form_pg_attribute) GETSTRUCT(tuple))->attisdropped) { ReleaseSysCache(tuple); return NULL; } return tuple; }
Definition at line 906 of file syscache.c.
References heap_copytuple(), HeapTupleIsValid, ReleaseSysCache(), and SearchSysCache().
{ HeapTuple tuple, newtuple; tuple = SearchSysCache(cacheId, key1, key2, key3, key4); if (!HeapTupleIsValid(tuple)) return tuple; newtuple = heap_copytuple(tuple); ReleaseSysCache(tuple); return newtuple; }
Definition at line 1003 of file syscache.c.
References heap_copytuple(), HeapTupleIsValid, ReleaseSysCache(), and SearchSysCacheAttName().
Referenced by ATExecAddColumn(), ATExecAlterColumnType(), ATExecDropColumn(), ATExecDropNotNull(), ATExecSetNotNull(), ATExecSetStatistics(), ATExecSetStorage(), MergeAttributesIntoExisting(), and renameatt_internal().
{ HeapTuple tuple, newtuple; tuple = SearchSysCacheAttName(relid, attname); if (!HeapTupleIsValid(tuple)) return tuple; newtuple = heap_copytuple(tuple); ReleaseSysCache(tuple); return newtuple; }
Definition at line 930 of file syscache.c.
References HeapTupleIsValid, ReleaseSysCache(), and SearchSysCache().
Referenced by tsa_set_curdict(), and tsa_set_curprs().
{ HeapTuple tuple; tuple = SearchSysCache(cacheId, key1, key2, key3, key4); if (!HeapTupleIsValid(tuple)) return false; ReleaseSysCache(tuple); return true; }
Definition at line 1022 of file syscache.c.
References HeapTupleIsValid, ReleaseSysCache(), and SearchSysCacheAttName().
Referenced by ATExecDropInherit().
{ HeapTuple tuple; tuple = SearchSysCacheAttName(relid, attname); if (!HeapTupleIsValid(tuple)) return false; ReleaseSysCache(tuple); return true; }
struct catclist* SearchSysCacheList | ( | int | cacheId, | |
int | nkeys, | |||
Datum | key1, | |||
Datum | key2, | |||
Datum | key3, | |||
Datum | key4 | |||
) | [read] |
Definition at line 1106 of file syscache.c.
References elog, ERROR, PointerIsValid, SearchCatCacheList(), and SysCacheSize.
{ if (cacheId < 0 || cacheId >= SysCacheSize || !PointerIsValid(SysCache[cacheId])) elog(ERROR, "invalid cache ID: %d", cacheId); return SearchCatCacheList(SysCache[cacheId], nkeys, key1, key2, key3, key4); }
Datum SysCacheGetAttr | ( | int | cacheId, | |
HeapTuple | tup, | |||
AttrNumber | attributeNumber, | |||
bool * | isNull | |||
) |
Definition at line 1054 of file syscache.c.
References Assert, elog, ERROR, heap_getattr, InitCatCachePhase2(), PointerIsValid, and SysCacheSize.
Referenced by AlterDomainValidateConstraint(), AlterForeignDataWrapper(), AlterForeignServer(), AlterFunction(), AlterRole(), AlterSchemaOwner_internal(), AlterTSDictionary(), AlterUserMapping(), ATExecAlterColumnGenericOptions(), ATExecChangeOwner(), ATExecGenericOptions(), ATExecSetOptions(), ATExecSetRelOptions(), build_function_result_tupdesc_t(), CheckIndexCompatible(), compile_plperl_function(), compile_pltcl_function(), DefineDomain(), do_compile(), ExecGrant_Attribute(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Namespace(), ExecGrant_Relation(), ExecInitAgg(), fetch_function_defaults(), flatten_reloptions(), fmgr_c_validator(), fmgr_info_C_lang(), fmgr_info_cxt_security(), fmgr_internal_validator(), fmgr_security_definer(), fmgr_sql_validator(), func_get_detail(), generateClonedIndexStmt(), get_attribute_options(), get_attstatsslot(), get_default_acl_internal(), get_func_arg_info(), get_func_result_name(), get_object_namespace(), get_tablespace(), get_typdefault(), GetForeignColumnOptions(), GetForeignDataWrapper(), GetForeignServer(), GetForeignTable(), GetUserMapping(), init_sql_fcache(), initialize_peragg(), inline_function(), inline_set_returning_function(), lookup_ts_dictionary_cache(), make_new_heap(), MatchNamedCall(), md5_crypt_verify(), pg_attribute_aclmask(), pg_class_aclmask(), pg_database_aclmask(), pg_foreign_data_wrapper_aclmask(), pg_foreign_server_aclmask(), pg_get_constraintdef_worker(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_language_aclmask(), pg_namespace_aclmask(), pg_proc_aclmask(), pg_tablespace_aclmask(), pg_type_aclmask(), PLy_procedure_create(), prepare_sql_fn_parse_info(), print_function_arguments(), ProcedureCreate(), ri_LoadConstraintInfo(), SetDefaultACL(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformIndexConstraint(), TryReuseForeignKey(), and validateCheckConstraint().
{ /* * We just need to get the TupleDesc out of the cache entry, and then we * can apply heap_getattr(). Normally the cache control data is already * valid (because the caller recently fetched the tuple via this same * cache), but there are cases where we have to initialize the cache here. */ if (cacheId < 0 || cacheId >= SysCacheSize || !PointerIsValid(SysCache[cacheId])) elog(ERROR, "invalid cache ID: %d", cacheId); if (!PointerIsValid(SysCache[cacheId]->cc_tupdesc)) { InitCatCachePhase2(SysCache[cacheId], false); Assert(PointerIsValid(SysCache[cacheId]->cc_tupdesc)); } return heap_getattr(tup, attributeNumber, SysCache[cacheId]->cc_tupdesc, isNull); }