PostgreSQL Source Code
git master
|
#include "access/tupdesc.h"
#include "access/xlog.h"
#include "catalog/pg_class.h"
#include "catalog/pg_index.h"
#include "catalog/pg_publication.h"
#include "nodes/bitmapset.h"
#include "partitioning/partdefs.h"
#include "rewrite/prs2lock.h"
#include "storage/block.h"
#include "storage/relfilenode.h"
#include "utils/relcache.h"
#include "utils/reltrigger.h"
Go to the source code of this file.
Data Structures | |
struct | LockRelId |
struct | LockInfoData |
struct | RelationData |
struct | ForeignKeyCacheInfo |
struct | AutoVacOpts |
struct | StdRdOptions |
struct | ViewOptions |
Macros | |
#define | HEAP_MIN_FILLFACTOR 10 |
#define | HEAP_DEFAULT_FILLFACTOR 100 |
#define | RelationGetToastTupleTarget(relation, defaulttarg) |
#define | RelationGetFillFactor(relation, defaultff) |
#define | RelationGetTargetPageUsage(relation, defaultff) (BLCKSZ * RelationGetFillFactor(relation, defaultff) / 100) |
#define | RelationGetTargetPageFreeSpace(relation, defaultff) (BLCKSZ * (100 - RelationGetFillFactor(relation, defaultff)) / 100) |
#define | RelationIsUsedAsCatalogTable(relation) |
#define | RelationGetParallelWorkers(relation, defaultpw) |
#define | RelationIsSecurityView(relation) |
#define | RelationHasCheckOption(relation) |
#define | RelationHasLocalCheckOption(relation) |
#define | RelationHasCascadedCheckOption(relation) |
#define | RelationIsValid(relation) PointerIsValid(relation) |
#define | InvalidRelation ((Relation) NULL) |
#define | RelationHasReferenceCountZero(relation) ((bool)((relation)->rd_refcnt == 0)) |
#define | RelationGetForm(relation) ((relation)->rd_rel) |
#define | RelationGetRelid(relation) ((relation)->rd_id) |
#define | RelationGetNumberOfAttributes(relation) ((relation)->rd_rel->relnatts) |
#define | IndexRelationGetNumberOfAttributes(relation) ((relation)->rd_index->indnatts) |
#define | IndexRelationGetNumberOfKeyAttributes(relation) ((relation)->rd_index->indnkeyatts) |
#define | RelationGetDescr(relation) ((relation)->rd_att) |
#define | RelationGetRelationName(relation) (NameStr((relation)->rd_rel->relname)) |
#define | RelationGetNamespace(relation) ((relation)->rd_rel->relnamespace) |
#define | RelationIsMapped(relation) |
#define | RelationOpenSmgr(relation) |
#define | RelationCloseSmgr(relation) |
#define | RelationGetTargetBlock(relation) ( (relation)->rd_smgr != NULL ? (relation)->rd_smgr->smgr_targblock : InvalidBlockNumber ) |
#define | RelationSetTargetBlock(relation, targblock) |
#define | RelationIsPermanent(relation) ((relation)->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT) |
#define | RelationNeedsWAL(relation) |
#define | RelationUsesLocalBuffers(relation) ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP) |
#define | RELATION_IS_LOCAL(relation) |
#define | RELATION_IS_OTHER_TEMP(relation) |
#define | RelationIsScannable(relation) ((relation)->rd_rel->relispopulated) |
#define | RelationIsPopulated(relation) ((relation)->rd_rel->relispopulated) |
#define | RelationIsAccessibleInLogicalDecoding(relation) |
#define | RelationIsLogicallyLogged(relation) |
Typedefs | |
typedef struct LockRelId | LockRelId |
typedef struct LockInfoData | LockInfoData |
typedef LockInfoData * | LockInfo |
typedef struct RelationData | RelationData |
typedef struct ForeignKeyCacheInfo | ForeignKeyCacheInfo |
typedef struct AutoVacOpts | AutoVacOpts |
typedef struct StdRdOptions | StdRdOptions |
typedef enum ViewOptCheckOption | ViewOptCheckOption |
typedef struct ViewOptions | ViewOptions |
Enumerations | |
enum | ViewOptCheckOption { VIEW_OPTION_CHECK_OPTION_NOT_SET, VIEW_OPTION_CHECK_OPTION_LOCAL, VIEW_OPTION_CHECK_OPTION_CASCADED } |
Functions | |
void | RelationIncrementReferenceCount (Relation rel) |
void | RelationDecrementReferenceCount (Relation rel) |
#define HEAP_DEFAULT_FILLFACTOR 100 |
Definition at line 312 of file rel.h.
Referenced by heap_multi_insert(), heap_page_prune_opt(), raw_heap_insert(), and RelationGetBufferForTuple().
#define IndexRelationGetNumberOfAttributes | ( | relation | ) | ((relation)->rd_index->indnatts) |
Definition at line 469 of file rel.h.
Referenced by _bt_allequalimage(), _bt_check_natts(), _bt_insertonpg(), _bt_mkscankey(), _bt_readpage(), _bt_truncate(), RelationInitIndexAccessInfo(), spgGetCache(), systable_beginscan(), and systable_beginscan_ordered().
#define IndexRelationGetNumberOfKeyAttributes | ( | relation | ) | ((relation)->rd_index->indnkeyatts) |
Definition at line 476 of file rel.h.
Referenced by _bt_afternewitemoff(), _bt_allequalimage(), _bt_bottomupdel_pass(), _bt_buildadd(), _bt_check_natts(), _bt_compare(), _bt_dedup_pass(), _bt_do_singleval(), _bt_findsplitloc(), _bt_insertonpg(), _bt_keep_natts(), _bt_keep_natts_fast(), _bt_load(), _bt_mkscankey(), _bt_newroot(), _bt_split(), _bt_strategy(), _bt_truncate(), _bt_uppershutdown(), ATExecReplicaIdentity(), build_replindex_scan_key(), BuildIndexValueDescription(), BuildSpeculativeIndexInfo(), check_exclusion_or_unique_constraint(), ExecIndexBuildScanKeys(), gistbuild(), gistcanreturn(), gistchoose(), gistCompressValues(), gistDeCompressAtt(), gistFetchTuple(), gistgetadjusted(), gistRelocateBuildBuffersOnSplit(), gistrescan(), index_recheck_constraint(), initGISTstate(), pg_nextoid(), RelationFindReplTupleByIndex(), RelationGetExclusionInfo(), RelationInitIndexAccessInfo(), spgGetCache(), tuplesort_begin_cluster(), tuplesort_begin_index_btree(), and tuplesort_begin_index_gist().
#define RELATION_IS_LOCAL | ( | relation | ) |
Definition at line 590 of file rel.h.
Referenced by _bt_getbuf(), BloomNewBuffer(), brin_getinsertbuffer(), btvacuumscan(), GetOldestNonRemovableTransactionId(), GinNewBuffer(), ginvacuumcleanup(), gistNewBuffer(), gistvacuumscan(), GlobalVisTestFor(), RelationGetBufferForTuple(), revmap_physical_extend(), SpGistNewBuffer(), and spgvacuumscan().
#define RELATION_IS_OTHER_TEMP | ( | relation | ) |
Definition at line 600 of file rel.h.
Referenced by acquire_inherited_sample_rows(), analyze_rel(), apply_handle_truncate(), ATRewriteTables(), bt_metap(), bt_page_items_internal(), bt_page_stats_internal(), btree_index_checkable(), CheckRelationTableSpaceMove(), cluster(), cluster_rel(), DefineIndex(), ExecuteTruncate(), expand_inherited_rtentry(), expand_partitioned_rtentry(), get_raw_page_internal(), gin_clean_pending_list(), hash_bitmap_info(), pgstat_relation(), pgstatginindex_internal(), pgstathashindex(), pgstatindex_impl(), pgstattuple_approx_internal(), PrefetchBuffer(), ReadBufferExtended(), reindex_index(), truncate_check_activity(), and vacuum_rel().
#define RelationCloseSmgr | ( | relation | ) |
Definition at line 526 of file rel.h.
Referenced by RelationCacheInvalidate(), RelationClearRelation(), RelationCloseSmgrByOid(), RelationDestroyRelation(), RelationDropStorage(), and RelationReloadIndexInfo().
#define RelationGetDescr | ( | relation | ) | ((relation)->rd_att) |
Definition at line 483 of file rel.h.
Referenced by _bt_check_unique(), _bt_checkkeys(), _bt_compare(), _bt_keep_natts(), _bt_keep_natts_fast(), _bt_load(), _bt_mkscankey(), _bt_truncate(), _hash_checkqual(), acquire_inherited_sample_rows(), AddEnumLabel(), addFkRecurseReferenced(), addFkRecurseReferencing(), AddRelationNewConstraints(), AddRoleMems(), AddSubscriptionRelState(), AlterDatabase(), AlterDatabaseOwner(), AlterDomainDefault(), AlterDomainNotNull(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner_internal(), AlterForeignServer(), AlterForeignServerOwner_internal(), AlterFunction(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterOperator(), AlterPolicy(), AlterPublicationOptions(), AlterRole(), AlterSchemaOwner_internal(), AlterSetting(), AlterStatistics(), AlterSubscription(), AlterTableSpaceOptions(), AlterTSDictionary(), AlterTypeOwnerInternal(), AlterTypeRecurse(), AlterUserMapping(), AppendAttributeTuples(), apply_handle_delete(), apply_handle_insert(), apply_handle_tuple_routing(), apply_handle_update(), apply_returning_filter(), ApplyExtensionUpdates(), ApplySetting(), ATAddForeignKeyConstraint(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAttachPartition(), ATExecAttachPartitionIdx(), ATExecChangeOwner(), ATExecColumnDefault(), ATExecDropNotNull(), ATExecGenericOptions(), ATExecSetOptions(), ATExecSetRelOptions(), ATGetQueueEntry(), ATPrepAlterColumnType(), ATRewriteTable(), AttachPartitionEnsureIndexes(), BeginCopyFrom(), BeginCopyTo(), brin_build_desc(), brin_page_items(), bt_normalize_tuple(), bt_tuple_present_callback(), btbeginscan(), btinsert(), build_remote_returning(), BuildEventTriggerCache(), CastCreate(), CatalogCacheInitializeCache(), CatalogIndexInsert(), change_owner_fix_column_acls(), check_selective_binary_conversion(), check_tuple(), check_tuple_attribute(), CheckAttributeType(), CloneFkReferenced(), CloneFkReferencing(), CloneRowTriggersToPartition(), CollationCreate(), comparetup_index_btree(), compute_expr_stats(), compute_index_stats(), ComputePartitionAttrs(), ConstraintImpliedByRelConstraint(), ConstructTupleDescriptor(), conversion_error_callback(), copy_table_data(), copyTemplateDependencies(), create_foreign_modify(), CreateAccessMethod(), CreateComments(), CreateConstraintEntry(), createdb(), CreatePolicy(), CreateProceduralLanguage(), CreatePublication(), CreateRole(), CreateSharedComments(), CreateSubscription(), CreateTransform(), CreateTrigger(), currtid_for_view(), DefineIndex(), DefineQueryRewrite(), DefineRelation(), DefineSequence(), DelRoleMems(), deparseAnalyzeSql(), deparseTargetList(), DetachAddConstraintIfNeeded(), DetachPartitionFinalize(), do_autovacuum(), DoCopy(), DoCopyTo(), EnumValuesCreate(), errtablecol(), EventTriggerSQLDropAddObject(), ExecAlterExtensionStmt(), ExecCheckPlanOutput(), ExecComputeStoredGenerated(), ExecConstraints(), ExecGetChildToRootMap(), ExecGetReturningSlot(), ExecGetTriggerNewSlot(), ExecGetTriggerOldSlot(), ExecGrant_Attribute(), ExecGrant_Database(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Largeobject(), ExecGrant_Namespace(), ExecGrant_Relation(), ExecGrant_Tablespace(), ExecGrant_Type(), ExecInitBitmapHeapScan(), ExecInitCustomScan(), ExecInitForeignScan(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitInsertProjection(), ExecInitPartitionDispatchInfo(), ExecInitPartitionInfo(), ExecInitRoutingInfo(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitTidRangeScan(), ExecInitTidScan(), ExecInitUpdateProjection(), ExecPartitionCheckEmitError(), ExecWithCheckOptions(), expand_single_inheritance_child(), expandTableLikeClause(), extension_config_remove(), ExtractReplicaIdentity(), file_acquire_sample_rows(), fill_extraUpdatedCols(), generateClonedIndexStmt(), GenerateTypeDependencies(), get_file_fdw_attribute_options(), get_object_address_attrdef(), get_primary_key_attnos(), get_relation_constraint_attnos(), GetComment(), GetSecurityLabel(), GetSharedSecurityLabel(), getSpGistTupleDesc(), GetTypeCollations(), gist_page_items(), has_stored_generated_columns(), hashbuildCallback(), hashinsert(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), HeapDetermineModifiedColumns(), heapgettup(), heapgettup_pagemode(), index_concurrently_create_copy(), index_concurrently_swap(), index_drop(), init_returning_filter(), initGinState(), InitializeAttributeOids(), InsertPgAttributeTuples(), InsertPgClassTuple(), InsertRule(), inv_truncate(), inv_write(), LargeObjectCreate(), load_typcache_tupdesc(), logicalrep_rel_open(), logicalrep_write_attrs(), logicalrep_write_tuple(), make_build_data(), make_inh_translation_list(), make_new_heap(), make_ruledef(), make_tuple_from_result_row(), make_viewdef(), MakeConfigurationMapping(), map_partition_varattnos(), maybe_send_schema(), MergeAttributes(), MergeAttributesIntoExisting(), MergeConstraintsIntoExisting(), movedb(), NextCopyFrom(), OperatorCreate(), PartConstraintImpliedByRelConstraint(), pg_decode_change(), pg_event_trigger_ddl_commands(), pg_extension_config_dump(), pg_identify_object(), pg_largeobject_aclmask_snapshot(), pgstat_collect_oids(), plpgsql_exec_trigger(), pltcl_build_tuple_result(), pltcl_trigger_handler(), PLy_exec_trigger(), PLy_modify_tuple(), PLy_trigger_build_args(), postgresAcquireSampleRowsFunc(), postgresBeginDirectModify(), postgresBeginForeignInsert(), postgresBeginForeignScan(), postgresPlanForeignModify(), ProcedureCreate(), publication_add_relation(), RangeCreate(), readtup_index(), recordExtensionInitPrivWorker(), recordExtObjInitPriv(), recordMultipleDependencies(), reform_and_rewrite_tuple(), RelationBuildPartitionDesc(), RelationBuildRowSecurity(), RelationBuildRuleLock(), RelationClearMissing(), RelationFindReplTupleSeq(), RelationNameGetTupleDesc(), RemoveAttributeById(), RemoveRoleFromObjectPolicy(), RenameRole(), ReorderBufferToastAppendChunk(), ReorderBufferToastReplace(), replorigin_create(), ri_Check_Pk_Match(), RI_FKey_check(), RI_FKey_fk_upd_check_required(), RI_FKey_pk_upd_check_required(), send_relation_and_attrs(), sepgsql_relation_setattr_extra(), serialize_expr_stats(), set_relation_column_names(), SetAttrMissing(), SetDefaultACL(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepChangeDep(), slot_fill_defaults(), spgendscan(), spgGetCache(), statext_store(), StoreAttrDefault(), StorePartitionBound(), StorePartitionKey(), StoreSingleInheritance(), table_slot_create(), transformAlterTableStmt(), transformTableLikeClause(), tuple_data_split_internal(), tuplesort_putindextuplevalues(), TypeCreate(), update_attstats(), UpdateIndexRelation(), UpdateSubscriptionRelState(), validateDomainConstraint(), and visitDependenciesOf().
#define RelationGetFillFactor | ( | relation, | |
defaultff | |||
) |
#define RelationGetForm | ( | relation | ) | ((relation)->rd_rel) |
Definition at line 451 of file rel.h.
Referenced by AlterSeqNamespaces(), CatalogCacheInitializeCache(), change_owner_recurse_to_sequences(), check_publication_add_relation(), ConstructTupleDescriptor(), ExecInitPartitionInfo(), ExecOpenIndices(), get_relation_info(), map_partition_varattnos(), pg_decode_change(), RelationGetIndexAttrBitmap(), rename_constraint_internal(), renameatt_internal(), ri_PerformCheck(), and ri_PlanCheck().
#define RelationGetNamespace | ( | relation | ) | ((relation)->rd_rel->relnamespace) |
Definition at line 498 of file rel.h.
Referenced by acquire_inherited_sample_rows(), addFkRecurseReferenced(), addFkRecurseReferencing(), AddRelationNewConstraints(), AlterObjectNamespace_oid(), AlterTableNamespace(), ATExecAddConstraint(), ATParseTransformCmd(), CloneFkReferencing(), copy_table(), copy_table_data(), CreateStatistics(), CreateTrigger(), currtid_internal(), DefineIndex(), deparseRelation(), do_analyze_rel(), DoCopy(), errtable(), ExecBRInsertTriggers(), ExecRefreshMatView(), generateSerialExtraStmts(), heap_vacuum_rel(), index_constraint_create(), index_create(), IsToastRelation(), logicalrep_write_rel(), make_new_heap(), parallel_vacuum_main(), plpgsql_fulfill_promise(), process_owned_by(), quoteRelationName(), RebuildConstraintComment(), refresh_by_match_merge(), reindex_index(), reindex_relation(), RenameRelationInternal(), SPI_getnspname(), StoreRelCheck(), and transformIndexConstraint().
#define RelationGetNumberOfAttributes | ( | relation | ) | ((relation)->rd_rel->relnatts) |
Definition at line 463 of file rel.h.
Referenced by AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), attnameAttNum(), boot_openrel(), build_physical_tlist(), BuildOnConflictExcludedTargetlist(), checkInsertTargets(), expand_targetlist(), get_rel_data_width(), get_relation_info(), get_rels_with_domain(), GetTypeCollations(), gistrescan(), refresh_by_match_merge(), RelationBuildTupleDesc(), RelationClearMissing(), RelationGetIndexAttOptions(), RelationGetIndexRawAttOptions(), RelationInitIndexAccessInfo(), rewriteTargetListIU(), transformUpdateTargetList(), and tuplesort_begin_cluster().
#define RelationGetParallelWorkers | ( | relation, | |
defaultpw | |||
) |
Definition at line 360 of file rel.h.
Referenced by get_relation_info().
Definition at line 491 of file rel.h.
Referenced by _bt_allequalimage(), _bt_check_third_page(), _bt_check_unique(), _bt_checkpage(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_findsplitloc(), _bt_first(), _bt_get_endpoint(), _bt_getmeta(), _bt_getroot(), _bt_gettrueroot(), _bt_insert_parent(), _bt_insertonpg(), _bt_lock_subtree_parent(), _bt_mark_page_halfdead(), _bt_moveright(), _bt_newroot(), _bt_pagedel(), _bt_split(), _bt_start_vacuum(), _bt_stepright(), _bt_unlink_halfdead_page(), _bt_walk_left(), _hash_addovflpage(), _hash_checkpage(), _hash_datum2hashkey_type(), _hash_getnewbuf(), _hash_init(), _hash_pgaddmultitup(), _hash_pgaddtup(), acquire_inherited_sample_rows(), acquire_sample_rows(), add_with_check_options(), addFkRecurseReferenced(), addFkRecurseReferencing(), addRangeTableEntryForRelation(), AddRelationNewConstraints(), AlterDomainNotNull(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterPolicy(), AlterTableNamespace(), analyze_rel(), apply_handle_delete_internal(), apply_handle_tuple_routing(), apply_handle_update_internal(), ATAddForeignKeyConstraint(), AtEOSubXact_cleanup(), AtEOXact_cleanup(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAddIdentity(), ATExecAddIndexConstraint(), ATExecAddInherit(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecAttachPartitionIdx(), ATExecChangeOwner(), ATExecCheckNotNull(), ATExecClusterOn(), ATExecColumnDefault(), ATExecDetachPartition(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropNotNull(), ATExecDropOf(), ATExecGenericOptions(), ATExecReplicaIdentity(), ATExecSetCompression(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecValidateConstraint(), ATParseTransformCmd(), ATPrepAlterColumnType(), ATPrepChangePersistence(), ATPrepCmd(), ATPrepDropExpression(), ATPrepSetNotNull(), ATRewriteTable(), ATRewriteTables(), ATSimplePermissions(), AttachPartitionEnsureIndexes(), AttrDefaultFetch(), ATTypedTableRecursion(), ATWrongRelkindError(), BeginCopyFrom(), BeginCopyTo(), blbuild(), brin_desummarize_range(), brin_doinsert(), brin_doupdate(), brin_getinsertbuffer(), brin_summarize_range(), brinbuild(), brininsert(), bt_check_every_level(), bt_check_level_from_leftmost(), bt_child_check(), bt_child_highkey_check(), bt_downlink_missing_check(), bt_index_check_internal(), bt_metap(), bt_normalize_tuple(), bt_page_items_internal(), bt_page_stats_internal(), bt_recheck_sibling_links(), bt_right_page_check_scankey(), bt_target_page_check(), bt_tuple_present_callback(), btbuild(), btree_index_checkable(), btree_index_mainfork_expected(), BTreeTupleGetHeapTIDCareful(), btvacuumpage(), build_column_default(), BuildRelationExtStatistics(), CatalogCacheInitializeCache(), check_default_partition_contents(), check_exclusion_or_unique_constraint(), check_for_column_name_collision(), check_index_is_clusterable(), check_object_ownership(), check_publication_add_relation(), check_relation_relkind(), CheckCmdReplicaIdentity(), CheckConstraintFetch(), checkFkeyPermissions(), checkInsertTargets(), CheckRelationLockedByMe(), CheckRelationTableSpaceMove(), CheckTableNotInUse(), CheckValidResultRel(), CheckValidRowMarkRel(), CloneFkReferenced(), CloneFkReferencing(), CloneRowTriggersToPartition(), closerel(), collectMatchBitmap(), CommentObject(), comparetup_index_btree(), conversion_error_callback(), copy_table(), copy_table_data(), CopyFrom(), CopyGetAttnums(), CreateFakeRelcacheEntry(), CreateInheritance(), CreatePolicy(), CreateStatistics(), CreateTrigger(), currtid_internal(), currval_oid(), DefineIndex(), DefineQueryRewrite(), DefineRelation(), DefineVirtualRelation(), deparseRelation(), do_analyze_rel(), do_setval(), DoCopy(), EnableDisableTrigger(), entryExecPlaceToPage(), entrySplitPage(), errtable(), EvalPlanQualFetchRowMark(), ExecBRInsertTriggers(), ExecCheckIndexConstraints(), ExecComputeStoredGenerated(), ExecConstraints(), ExecFindPartition(), ExecLockRows(), ExecOpenScanRelation(), ExecPartitionCheckEmitError(), ExecRefreshMatView(), ExecRelCheck(), ExecSecLabelStmt(), ExecuteTruncateGuts(), expandTableLikeClause(), file_acquire_sample_rows(), find_composite_type_dependencies(), fireRIRrules(), generate_partition_qual(), generate_relation_name(), generateClonedIndexStmt(), get_actual_variable_endpoint(), get_object_address_publication_rel(), get_raw_page_internal(), get_rel_from_relname(), get_relation_by_qualified_name(), GetNewOidWithIndex(), gin_clean_pending_list(), ginbuild(), ginFinishSplit(), GinFormTuple(), ginHeapTupleFastInsert(), ginVacuumEntryPage(), gistbuild(), gistcheckpage(), gistdoinsert(), gistFindPath(), gistfixsplit(), gistplacetopage(), gistrescan(), gistSplit(), gistUserPicksplit(), gistvacuumpage(), hash_bitmap_info(), hashbuild(), heap_acquire_tuplock(), heap_fetch_toast_slice(), heap_force_common(), heap_lock_tuple(), heap_vacuum_rel(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), heapam_tuple_lock(), index_build(), index_check_primary_key(), index_create(), index_getprocinfo(), index_open(), init_sequence(), initGinState(), InsertOneNull(), lastval(), lazy_cleanup_one_index(), lazy_vacuum_one_index(), load_relcache_init_file(), logicalrep_write_rel(), make_inh_translation_list(), MarkInheritDetached(), MergeAttributes(), MergeAttributesIntoExisting(), MergeConstraintsIntoExisting(), MergeWithExistingConstraint(), nextval_internal(), NotNullImpliedByRelConstraints(), PageGetItemIdCareful(), palloc_btree_page(), parallel_vacuum_main(), pg_nextoid(), pg_sequence_last_value(), pgrowlocks(), pgstat_relation(), pgstatginindex_internal(), pgstathashindex(), pgstatindex_impl(), pgstattuple_approx_internal(), plpgsql_fulfill_promise(), postgresAcquireSampleRowsFunc(), postgresBeginForeignInsert(), postgresExecForeignTruncate(), PrintRelCacheLeakWarning(), process_owned_by(), publication_add_relation(), PublicationAddTables(), PublicationDropTables(), QueuePartitionConstraintValidation(), quoteRelationName(), read_seq_tuple(), RebuildConstraintComment(), refresh_by_match_merge(), refuseDupeIndexAttach(), reindex_index(), reindex_relation(), ReindexRelationConcurrently(), relation_mark_replica_identity(), RelationAddExtraBlocks(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationBuildRowSecurity(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationBuildTupleDesc(), RelationCacheInitializePhase3(), RelationGetBufferForTuple(), RelationGetExclusionInfo(), RelationInitIndexAccessInfo(), RelationInitPhysicalAddr(), RelationSetNewRelfilenode(), RemoveConstraintById(), RemoveInheritance(), RemovePolicyById(), RemoveRewriteRuleById(), RemoveRoleFromObjectPolicy(), RemoveTriggerById(), rename_policy(), renameatt_internal(), RenameRewriteRule(), renametrig(), report_triggers(), ResourceOwnerForgetRelationRef(), revmap_physical_extend(), RewriteQuery(), rewriteTargetView(), ri_FetchConstraintInfo(), RI_FKey_check(), RI_Initial_Check(), ri_PerformCheck(), ri_ReportViolation(), sanity_check_relation(), sepgsql_relation_setattr_extra(), spgbuild(), spgdoinsert(), spgGetCache(), spgprocesspending(), SPI_getrelname(), ss_get_location(), ss_report_location(), StoreRelCheck(), systable_beginscan_ordered(), table_open(), table_openrv(), table_openrv_extended(), table_tuple_get_latest_tid(), test_rls_hooks_permissive(), test_rls_hooks_restrictive(), transformAlterTableStmt(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), transformIndexConstraint(), transformOnConflictArbiter(), transformPartitionBound(), transformPartitionCmd(), transformPartitionRangeBounds(), transformTableLikeClause(), transformUpdateTargetList(), triggered_change_notification(), try_table_open(), vacuum_rel(), vacuumLeafPage(), validateDomainConstraint(), visibilitymap_clear(), visibilitymap_get_status(), visibilitymap_prepare_truncate(), visibilitymap_set(), writeListPage(), and XactLockTableWaitErrorCb().
#define RelationGetRelid | ( | relation | ) | ((relation)->rd_id) |
Definition at line 457 of file rel.h.
Referenced by _bt_begin_parallel(), acquire_inherited_sample_rows(), addFkRecurseReferenced(), addFkRecurseReferencing(), addRangeTableEntry(), addRangeTableEntryForRelation(), AddRelationNewConstraints(), afterTriggerInvokeEvents(), AfterTriggerSaveEvent(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterPublicationTables(), AlterSchemaOwner_internal(), AlterSeqNamespaces(), AlterTableNamespaceInternal(), analyze_rel(), ATAddCheckConstraint(), ATAddForeignKeyConstraint(), ATCheckPartitionsNotInUse(), ATDetachCheckNoForeignKeyRefs(), ATExecAddColumn(), ATExecAddConstraint(), ATExecAddIdentity(), ATExecAddIndex(), ATExecAddInherit(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecAttachPartitionIdx(), ATExecCheckNotNull(), ATExecCmd(), ATExecColumnDefault(), ATExecCookedColumnDefault(), ATExecDetachPartition(), ATExecDetachPartitionFinalize(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropInherit(), ATExecDropNotNull(), ATExecDropOf(), ATExecForceNoForceRowSecurity(), ATExecGenericOptions(), ATExecReplicaIdentity(), ATExecSetCompression(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetRowSecurity(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSetTableSpace(), ATExecSetTableSpaceNoStorage(), ATExecValidateConstraint(), ATGetQueueEntry(), ATParseTransformCmd(), ATPrepAlterColumnType(), ATPrepChangePersistence(), ATPrepCmd(), ATPrepDropExpression(), ATPrepSetNotNull(), ATRewriteTable(), ATSimplePermissions(), ATSimpleRecursion(), AttachPartitionEnsureIndexes(), AttrDefaultFetch(), begin_parallel_vacuum(), BeginCopyFrom(), BeginCopyTo(), bringetbitmap(), brininsert(), brinvacuumcleanup(), build_column_default(), build_replindex_scan_key(), BuildDummyIndexInfo(), BuildIndexInfo(), BuildIndexValueDescription(), BuildRelationExtStatistics(), CacheInvalidateHeapTuple(), CacheInvalidateRelcache(), CatalogIndexInsert(), check_default_partition_contents(), check_for_column_name_collision(), check_index_is_clusterable(), check_object_ownership(), CheckConstraintFetch(), checkFkeyPermissions(), CheckTableNotInUse(), CloneFkReferenced(), CloneFkReferencing(), CloneRowTriggersToPartition(), ComputeExtStatisticsRows(), ComputePartitionAttrs(), CopyFrom(), create_estate_for_relation(), create_foreign_modify(), create_toast_table(), createForeignKeyActionTriggers(), CreateInheritance(), CreateStatistics(), CreateTrigger(), currtid_internal(), DefineQueryRewrite(), DefineRelation(), deparseAnalyzeSql(), deparseRelation(), DetachPartitionFinalize(), do_analyze_rel(), DoCopy(), EnableDisableRule(), EnableDisableTrigger(), errtablecol(), ExecBatchInsert(), ExecBSDeleteTriggers(), ExecBSInsertTriggers(), ExecBSUpdateTriggers(), ExecBuildSlotPartitionKeyDescription(), ExecConstraints(), ExecDelete(), ExecFindPartition(), ExecGetTriggerResultRel(), ExecInitModifyTable(), ExecInitPartitionDispatchInfo(), ExecInsert(), ExecInsertIndexTuples(), ExecLookupResultRelByOid(), ExecModifyTable(), ExecPartitionCheckEmitError(), ExecProcessReturning(), ExecSetupPartitionTupleRouting(), ExecSetupTransitionCaptureState(), ExecUpdate(), ExecuteTruncate(), ExecuteTruncateGuts(), ExecWithCheckOptions(), expand_single_inheritance_child(), expandTableLikeClause(), file_acquire_sample_rows(), fileAnalyzeForeignTable(), fileBeginForeignScan(), fileExplainForeignScan(), fireRIRrules(), ForeignNext(), formrdesc(), generate_partition_qual(), generate_relation_name(), generateClonedIndexStmt(), get_batch_size_option(), get_catalog_object_by_oid(), get_object_address_attrdef(), get_object_address_attribute(), get_object_address_publication_rel(), get_object_address_relobject(), get_pkey_attnames(), get_qual_for_hash(), get_rel_data_width(), get_rel_from_relname(), get_relation_by_qualified_name(), get_relation_foreign_keys(), get_relation_info(), get_rels_with_domain(), GetFdwRoutineForRelation(), GetNewOidWithIndex(), GetParentedForeignKeyRefs(), GetRelationPublicationActions(), heap_abort_speculative(), heap_beginscan(), heap_create_with_catalog(), heap_delete(), heap_fetch(), heap_get_latest_tid(), heap_hot_search_buffer(), heap_lock_tuple(), heap_multi_insert(), heap_page_is_all_visible(), heap_prepare_insert(), heap_prune_chain(), heap_truncate_check_FKs(), heap_update(), heap_vacuum_rel(), heapam_fetch_row_version(), heapam_index_fetch_tuple(), heapam_relation_copy_for_cluster(), heapam_scan_analyze_next_tuple(), heapam_tuple_insert(), heapam_tuple_insert_speculative(), heapam_tuple_lock(), heapam_tuple_update(), heapgetpage(), index_beginscan_parallel(), index_build(), index_check_primary_key(), index_constraint_create(), index_create(), index_parallelscan_initialize(), index_update_stats(), IndexCheckExclusion(), IndexSetParentIndex(), is_publishable_relation(), IsCatalogRelation(), IsSystemRelation(), lazy_scan_prune(), logical_heap_rewrite_flush_mappings(), logical_rewrite_log_mapping(), logicalrep_partition_open(), logicalrep_write_delete(), logicalrep_write_insert(), logicalrep_write_rel(), logicalrep_write_update(), make_append_rel_info(), make_inh_translation_list(), MarkInheritDetached(), maybe_send_schema(), MergeAttributes(), MergeAttributesIntoExisting(), MergeConstraintsIntoExisting(), MergeWithExistingConstraint(), OpenTableList(), PartitionDirectoryLookup(), pg_decode_change(), pg_nextoid(), pgoutput_change(), pgoutput_truncate(), pgrowlocks(), pgstat_report_analyze(), plpython_call_handler(), pltcl_trigger_handler(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresBeginDirectModify(), postgresBeginForeignInsert(), postgresExecForeignTruncate(), postgresIsForeignRelUpdatable(), PrepareToInvalidateCacheTuple(), process_owned_by(), publication_add_relation(), PublicationAddTables(), PublicationDropTables(), rebuild_relation(), refuseDupeIndexAttach(), ReindexRelationConcurrently(), relation_has_policies(), relation_is_updatable(), relation_mark_replica_identity(), RelationBuildDesc(), RelationBuildLocalRelation(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationBuildRowSecurity(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationBuildTupleDesc(), RelationCacheInitializePhase3(), RelationCacheInvalidate(), RelationClearMissing(), RelationClearRelation(), RelationGetExclusionInfo(), RelationGetFKeyList(), RelationGetIndexAttOptions(), RelationGetIndexList(), RelationGetIndexRawAttOptions(), RelationGetStatExtList(), RelationInitIndexAccessInfo(), RelationInitLockInfo(), RelationInitPhysicalAddr(), RelationReloadIndexInfo(), RelationReloadNailed(), RelationSetNewRelfilenode(), RemoveInheritance(), RewriteQuery(), ri_FetchConstraintInfo(), RI_Initial_Check(), RI_PartitionRemove_Check(), sanity_check_relation(), search_plan_tree(), SetIndexStorageProperties(), SetMatViewPopulatedState(), SetRelationNumChecks(), SetRelationTableSpace(), statapprox_heap(), StoreAttrDefault(), StorePartitionBound(), StorePartitionKey(), StoreRelCheck(), systable_beginscan(), systable_beginscan_ordered(), systable_recheck_tuple(), table_beginscan_catalog(), table_beginscan_parallel(), table_block_parallelscan_initialize(), table_scan_getnextslot(), TidListEval(), toast_get_valid_index(), toast_open_indexes(), toast_save_datum(), toastrel_valueid_exists(), transformIndexConstraint(), transformOnConflictArbiter(), transformPartitionBound(), transformPartitionRangeBounds(), transformTableLikeClause(), vac_update_relstats(), vacuum_rel(), validateForeignKeyConstraint(), validatePartitionedIndex(), and write_relcache_init_file().
#define RelationGetTargetBlock | ( | relation | ) | ( (relation)->rd_smgr != NULL ? (relation)->rd_smgr->smgr_targblock : InvalidBlockNumber ) |
Definition at line 542 of file rel.h.
Referenced by _bt_insert_parent(), _bt_search_insert(), brin_getinsertbuffer(), heapam_relation_copy_for_cluster(), intorel_startup(), RelationGetBufferForTuple(), and transientrel_startup().
#define RelationGetTargetPageFreeSpace | ( | relation, | |
defaultff | |||
) | (BLCKSZ * (100 - RelationGetFillFactor(relation, defaultff)) / 100) |
Definition at line 341 of file rel.h.
Referenced by heap_multi_insert(), heap_page_prune_opt(), raw_heap_insert(), and RelationGetBufferForTuple().
#define RelationGetTargetPageUsage | ( | relation, | |
defaultff | |||
) | (BLCKSZ * RelationGetFillFactor(relation, defaultff) / 100) |
#define RelationGetToastTupleTarget | ( | relation, | |
defaulttarg | |||
) |
Definition at line 318 of file rel.h.
Referenced by heap_toast_insert_or_update().
#define RelationHasCascadedCheckOption | ( | relation | ) |
Definition at line 420 of file rel.h.
Referenced by rewriteTargetView().
#define RelationHasCheckOption | ( | relation | ) |
Definition at line 398 of file rel.h.
Referenced by rewriteTargetView().
#define RelationHasLocalCheckOption | ( | relation | ) |
#define RelationHasReferenceCountZero | ( | relation | ) | ((bool)((relation)->rd_refcnt == 0)) |
Definition at line 441 of file rel.h.
Referenced by AtEOSubXact_cleanup(), AtEOXact_cleanup(), RelationCacheInvalidate(), RelationClearRelation(), RelationClose(), RelationDestroyRelation(), RelationFlushRelation(), and RelationForgetRelation().
#define RelationIsAccessibleInLogicalDecoding | ( | relation | ) |
Definition at line 626 of file rel.h.
Referenced by GetOldestNonRemovableTransactionId(), GlobalVisTestFor(), heap_delete(), heap_insert(), heap_multi_insert(), heap_update(), logical_begin_heap_rewrite(), and RelationInitPhysicalAddr().
#define RelationIsLogicallyLogged | ( | relation | ) |
Definition at line 643 of file rel.h.
Referenced by apply_handle_truncate(), ExecuteTruncate(), ExecuteTruncateGuts(), ExtractReplicaIdentity(), heap_insert(), heap_multi_insert(), log_heap_update(), and ReorderBufferProcessTXN().
#define RelationIsMapped | ( | relation | ) |
Definition at line 506 of file rel.h.
Referenced by CheckRelationTableSpaceMove(), create_toast_table(), index_create(), make_new_heap(), RelationCacheInvalidate(), and RelationSetNewRelfilenode().
#define RelationIsPermanent | ( | relation | ) | ((relation)->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT) |
Definition at line 559 of file rel.h.
Referenced by ATAddForeignKeyConstraint(), ATPrepChangePersistence(), check_publication_add_relation(), get_relation_info(), gistGetFakeLSN(), heapam_relation_copy_data(), index_copy_data(), and RememberToFreeTupleDescAtEOX().
#define RelationIsPopulated | ( | relation | ) | ((relation)->rd_rel->relispopulated) |
Definition at line 619 of file rel.h.
Referenced by cluster_rel(), and ExecRefreshMatView().
#define RelationIsScannable | ( | relation | ) | ((relation)->rd_rel->relispopulated) |
Definition at line 611 of file rel.h.
Referenced by ExecOpenScanRelation().
#define RelationIsSecurityView | ( | relation | ) |
Definition at line 388 of file rel.h.
Referenced by ApplyRetrieveRule(), and rewriteTargetView().
#define RelationIsUsedAsCatalogTable | ( | relation | ) |
Definition at line 349 of file rel.h.
Referenced by ATRewriteTables(), and transformOnConflictArbiter().
#define RelationIsValid | ( | relation | ) | PointerIsValid(relation) |
Definition at line 430 of file rel.h.
Referenced by index_build(), pgoutput_change(), PrefetchBuffer(), PrepareToInvalidateCacheTuple(), relation_open(), RelationIdGetRelation(), RelationInitLockInfo(), RememberToFreeTupleDescAtEOX(), ReorderBufferProcessTXN(), ReorderBufferToastReplace(), try_relation_open(), XactLockTableWait(), and XactLockTableWaitErrorCb().
#define RelationNeedsWAL | ( | relation | ) |
Definition at line 570 of file rel.h.
Referenced by _bt_dedup_pass(), _bt_delitems_delete(), _bt_delitems_delete_check(), _bt_delitems_vacuum(), _bt_drop_lock_and_maybe_pin(), _bt_getbuf(), _bt_getroot(), _bt_insertonpg(), _bt_leafbuild(), _bt_mark_page_halfdead(), _bt_newroot(), _bt_set_cleanup_info(), _bt_split(), _bt_unlink_halfdead_page(), _hash_addovflpage(), _hash_alloc_buckets(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), AlterSequence(), brin_doinsert(), brin_doupdate(), brinbuild(), brinRevmapDesummarizeRange(), createPostingTree(), dataBeginPlaceToPageLeaf(), dataExecPlaceToPageInternal(), dataExecPlaceToPageLeaf(), do_setval(), doPickSplit(), end_heap_rewrite(), entryExecPlaceToPage(), fill_seq_with_data(), FreeSpaceMapPrepareTruncateRel(), GenericXLogStart(), ginbuild(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginUpdateStats(), ginVacuumPostingTreeLeaf(), gist_indexsortbuild(), gist_indexsortbuild_flush_ready_pages(), gistbuild(), gistdeletepage(), gistdoinsert(), gistGetFakeLSN(), gistNewBuffer(), gistplacetopage(), gistprunepage(), gistvacuumpage(), gistvacuumscan(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_force_common(), heap_inplace_update(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_page_prune(), heap_update(), lazy_scan_heap(), lazy_scan_prune(), lazy_vacuum_heap_page(), log_heap_freeze(), log_heap_update(), log_split_page(), moveLeafs(), nextval_internal(), pg_truncate_visibility_map(), raw_heap_insert(), RelationTruncate(), revmap_physical_extend(), shiftList(), spgAddNodeAction(), spgbuild(), spgSplitNodeAction(), TransactionIdLimitedForOldSnapshots(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), visibilitymap_prepare_truncate(), visibilitymap_set(), writeListPage(), and xlogVacuumPage().
#define RelationOpenSmgr | ( | relation | ) |
Definition at line 514 of file rel.h.
Referenced by _bt_blwritepage(), _bt_load(), _hash_alloc_buckets(), autoprewarm_database_main(), bt_index_check_internal(), end_heap_rewrite(), FlushRelationBuffers(), FreeSpaceMapPrepareTruncateRel(), fsm_extend(), fsm_readbuf(), gist_indexsortbuild(), gist_indexsortbuild_flush_ready_pages(), heap_create(), heapam_relation_copy_data(), index_build(), index_copy_data(), pg_prewarm(), pg_truncate_visibility_map(), PrefetchBuffer(), raw_heap_insert(), ReadBufferExtended(), RelationGetNumberOfBlocksInFork(), RelationPreTruncate(), RelationTruncate(), table_block_relation_size(), visibilitymap_prepare_truncate(), vm_extend(), and vm_readbuf().
#define RelationSetTargetBlock | ( | relation, | |
targblock | |||
) |
Definition at line 549 of file rel.h.
Referenced by _bt_insertonpg(), _bt_search_insert(), brin_getinsertbuffer(), and RelationGetBufferForTuple().
#define RelationUsesLocalBuffers | ( | relation | ) | ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP) |
Definition at line 579 of file rel.h.
Referenced by _bt_conditionallockbuf(), _bt_lockbuf(), _bt_unlockbuf(), FlushRelationBuffers(), initscan(), lazy_space_alloc(), PredicateLockingNeededForRelation(), PrefetchBuffer(), relation_open(), table_block_parallelscan_initialize(), and try_relation_open().
typedef struct AutoVacOpts AutoVacOpts |
typedef struct ForeignKeyCacheInfo ForeignKeyCacheInfo |
typedef LockInfoData* LockInfo |
typedef struct LockInfoData LockInfoData |
typedef struct RelationData RelationData |
typedef struct StdRdOptions StdRdOptions |
typedef enum ViewOptCheckOption ViewOptCheckOption |
typedef struct ViewOptions ViewOptions |
enum ViewOptCheckOption |
void RelationDecrementReferenceCount | ( | Relation | rel | ) |
Definition at line 2076 of file relcache.c.
References Assert, CurrentResourceOwner, IsBootstrapProcessingMode, RelationData::rd_refcnt, and ResourceOwnerForgetRelationRef().
Referenced by DestroyPartitionDirectory(), heap_endscan(), index_endscan(), RelationCacheInitializePhase3(), RelationClose(), and RelationFlushRelation().
void RelationIncrementReferenceCount | ( | Relation | rel | ) |
Definition at line 2063 of file relcache.c.
References CurrentResourceOwner, IsBootstrapProcessingMode, RelationData::rd_refcnt, ResourceOwnerEnlargeRelationRefs(), and ResourceOwnerRememberRelationRef().
Referenced by heap_beginscan(), index_beginscan_internal(), PartitionDirectoryLookup(), RelationBuildLocalRelation(), RelationCacheInitializePhase3(), RelationFlushRelation(), and RelationIdGetRelation().