PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/genam.h"
#include "access/heapam.h"
#include "access/htup_details.h"
#include "access/xact.h"
#include "catalog/index.h"
#include "catalog/indexing.h"
#include "executor/executor.h"
#include "utils/rel.h"
Go to the source code of this file.
Macros | |
#define | CatalogTupleCheckConstraints(heapRel, tup) ((void) 0) |
Functions | |
CatalogIndexState | CatalogOpenIndexes (Relation heapRel) |
void | CatalogCloseIndexes (CatalogIndexState indstate) |
static void | CatalogIndexInsert (CatalogIndexState indstate, HeapTuple heapTuple, TU_UpdateIndexes updateIndexes) |
void | CatalogTupleInsert (Relation heapRel, HeapTuple tup) |
void | CatalogTupleInsertWithInfo (Relation heapRel, HeapTuple tup, CatalogIndexState indstate) |
void | CatalogTuplesMultiInsertWithInfo (Relation heapRel, TupleTableSlot **slot, int ntuples, CatalogIndexState indstate) |
void | CatalogTupleUpdate (Relation heapRel, ItemPointer otid, HeapTuple tup) |
void | CatalogTupleUpdateWithInfo (Relation heapRel, ItemPointer otid, HeapTuple tup, CatalogIndexState indstate) |
void | CatalogTupleDelete (Relation heapRel, ItemPointer tid) |
#define CatalogTupleCheckConstraints | ( | heapRel, | |
tup | |||
) | ((void) 0) |
Definition at line 217 of file indexing.c.
void CatalogCloseIndexes | ( | CatalogIndexState | indstate | ) |
Definition at line 61 of file indexing.c.
References ExecCloseIndices(), and pfree().
Referenced by AddNewAttributeTuples(), AppendAttributeTuples(), CatalogTupleInsert(), CatalogTupleUpdate(), CopyStatistics(), copyTemplateDependencies(), DefineTSConfiguration(), EnumValuesCreate(), InsertPgAttributeTuples(), inv_truncate(), inv_write(), MakeConfigurationMapping(), recordMultipleDependencies(), swap_relation_files(), and update_attstats().
|
static |
Definition at line 75 of file indexing.c.
References Assert, ExecDropSingleTupleTableSlot(), ExecStoreHeapTuple(), FormIndexDatum(), HeapTupleIsHeapOnly(), i, IndexInfo::ii_ExclusionOps, IndexInfo::ii_Expressions, IndexInfo::ii_NumIndexKeyAttrs, IndexInfo::ii_Predicate, IndexInfo::ii_ReadyForInserts, IndexInfo::ii_Summarizing, index_insert(), INDEX_MAX_KEYS, MakeSingleTupleTableSlot(), NIL, ReindexIsProcessingIndex(), RelationGetDescr, RelationGetRelid, ResultRelInfo::ri_IndexRelationDescs, ResultRelInfo::ri_IndexRelationInfo, ResultRelInfo::ri_NumIndices, ResultRelInfo::ri_RelationDesc, HeapTupleData::t_self, TTSOpsHeapTuple, TU_Summarizing, UNIQUE_CHECK_NO, UNIQUE_CHECK_YES, and values.
Referenced by CatalogTupleInsert(), CatalogTupleInsertWithInfo(), CatalogTuplesMultiInsertWithInfo(), CatalogTupleUpdate(), and CatalogTupleUpdateWithInfo().
CatalogIndexState CatalogOpenIndexes | ( | Relation | heapRel | ) |
Definition at line 43 of file indexing.c.
References ExecOpenIndices(), makeNode, ResultRelInfo::ri_RangeTableIndex, ResultRelInfo::ri_RelationDesc, and ResultRelInfo::ri_TrigDesc.
Referenced by AddNewAttributeTuples(), AppendAttributeTuples(), CatalogTupleInsert(), CatalogTupleUpdate(), CopyStatistics(), copyTemplateDependencies(), DefineTSConfiguration(), EnumValuesCreate(), InsertPgAttributeTuples(), inv_truncate(), inv_write(), MakeConfigurationMapping(), recordMultipleDependencies(), swap_relation_files(), and update_attstats().
void CatalogTupleDelete | ( | Relation | heapRel, |
ItemPointer | tid | ||
) |
Definition at line 365 of file indexing.c.
References simple_heap_delete().
Referenced by AlterSetting(), ATExecAlterColumnType(), changeDependenciesOn(), changeDependencyFor(), CreateComments(), CreateSharedComments(), delete_pg_statistic(), DeleteAttributeTuples(), DeleteComments(), deleteDependencyRecordsFor(), deleteDependencyRecordsForClass(), deleteDependencyRecordsForSpecific(), DeleteInheritsTuple(), DeleteInitPrivs(), deleteOneObject(), DeleteRelationTuple(), DeleteSecurityLabel(), DeleteSequenceTuple(), DeleteSharedComments(), DeleteSharedSecurityLabel(), DeleteSystemAttributeTuples(), DelRoleMems(), drop_parent_dependency(), DropConfigurationMapping(), dropDatabaseDependencies(), dropdb(), DropObjectById(), DropRole(), DropSetting(), DropSubscription(), DropTableSpace(), EnumValuesDelete(), ExecGrant_Parameter(), heap_drop_with_catalog(), index_drop(), IndexSetParentIndex(), inv_truncate(), LargeObjectDrop(), MakeConfigurationMapping(), RangeDelete(), recordExtensionInitPrivWorker(), RelationRemoveInheritance(), RemoveAttrDefaultById(), RemoveConstraintById(), RemoveExtensionById(), RemoveFunctionById(), RemoveOperatorById(), RemovePartitionKeyByRelId(), RemovePolicyById(), RemovePublicationById(), RemovePublicationRelById(), RemovePublicationSchemaById(), RemoveRewriteRuleById(), RemoveRoleFromInitPriv(), RemoveStatistics(), RemoveStatisticsById(), RemoveStatisticsDataById(), RemoveSubscriptionRel(), RemoveTriggerById(), RemoveTSConfigurationById(), RemoveTypeById(), ReplaceRoleInInitPriv(), replorigin_drop_by_name(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepChangeDep(), and shdepDropDependency().
Definition at line 233 of file indexing.c.
References CatalogCloseIndexes(), CatalogIndexInsert(), CatalogOpenIndexes(), CatalogTupleCheckConstraints, simple_heap_insert(), and TU_All.
Referenced by AddEnumLabel(), AddRoleMems(), AddSubscriptionRelState(), AggregateCreate(), AlterSetting(), CastCreate(), CollationCreate(), ConversionCreate(), CreateAccessMethod(), CreateComments(), CreateConstraintEntry(), createdb(), CreateForeignDataWrapper(), CreateForeignServer(), CreateForeignTable(), CreateOpFamily(), CreatePolicy(), CreateProceduralLanguage(), CreatePublication(), CreateRole(), CreateSharedComments(), CreateStatistics(), CreateSubscription(), CreateTableSpace(), CreateTransform(), CreateTriggerFiringOn(), CreateUserMapping(), DefineOpClass(), DefineSequence(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), insert_event_trigger_tuple(), InsertExtensionTuple(), InsertPgClassTuple(), InsertRule(), LargeObjectCreate(), NamespaceCreate(), OperatorCreate(), OperatorShellMake(), ParameterAclCreate(), ProcedureCreate(), publication_add_relation(), publication_add_schema(), RangeCreate(), recordExtensionInitPrivWorker(), replorigin_create(), SetDefaultACL(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepAddDependency(), shdepChangeDep(), statext_store(), StoreAttrDefault(), storeOperators(), StorePartitionKey(), storeProcedures(), StoreSingleInheritance(), TypeCreate(), TypeShellMake(), UpdateIndexRelation(), and upsert_pg_statistic().
void CatalogTupleInsertWithInfo | ( | Relation | heapRel, |
HeapTuple | tup, | ||
CatalogIndexState | indstate | ||
) |
Definition at line 256 of file indexing.c.
References CatalogIndexInsert(), CatalogTupleCheckConstraints, simple_heap_insert(), and TU_All.
Referenced by CopyStatistics(), inv_truncate(), inv_write(), and update_attstats().
void CatalogTuplesMultiInsertWithInfo | ( | Relation | heapRel, |
TupleTableSlot ** | slot, | ||
int | ntuples, | ||
CatalogIndexState | indstate | ||
) |
Definition at line 273 of file indexing.c.
References CatalogIndexInsert(), ExecFetchSlotHeapTuple(), GetCurrentCommandId(), heap_freetuple(), heap_multi_insert(), i, HeapTupleData::t_tableOid, TupleTableSlot::tts_tableOid, and TU_All.
Referenced by copyTemplateDependencies(), DefineTSConfiguration(), EnumValuesCreate(), InsertPgAttributeTuples(), MakeConfigurationMapping(), and recordMultipleDependencies().
void CatalogTupleUpdate | ( | Relation | heapRel, |
ItemPointer | otid, | ||
HeapTuple | tup | ||
) |
Definition at line 313 of file indexing.c.
References CatalogCloseIndexes(), CatalogIndexInsert(), CatalogOpenIndexes(), CatalogTupleCheckConstraints, simple_heap_update(), and TU_All.
Referenced by AddRoleMems(), AdjustNotNullInheritance(), AggregateCreate(), AlterCollation(), AlterConstraintNamespaces(), AlterConstrTriggerDeferrability(), AlterDatabase(), AlterDatabaseOwner(), AlterDatabaseRefreshColl(), AlterDomainAddConstraint(), AlterDomainDefault(), AlterDomainDropConstraint(), AlterDomainNotNull(), AlterDomainValidateConstraint(), AlterEventTrigger(), AlterEventTriggerOwner_internal(), AlterExtensionNamespace(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner_internal(), AlterForeignServer(), AlterForeignServerOwner_internal(), AlterFunction(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterOperator(), AlterPolicy(), AlterPublicationOptions(), AlterPublicationOwner_internal(), AlterRelationNamespaceInternal(), AlterRole(), AlterSchemaOwner_internal(), AlterSequence(), AlterSetting(), AlterStatistics(), AlterSubscription(), AlterSubscriptionOwner_internal(), AlterTableSpaceOptions(), AlterTSDictionary(), AlterTypeNamespaceInternal(), AlterTypeOwnerInternal(), AlterTypeRecurse(), AlterUserMapping(), ApplyExtensionUpdates(), ATExecAddColumn(), ATExecAddIdentity(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstrRecurse(), ATExecChangeOwner(), ATExecDropColumn(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropOf(), ATExecForceNoForceRowSecurity(), ATExecGenericOptions(), ATExecSetAccessMethodNoStorage(), ATExecSetCompression(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetRowSecurity(), ATExecSetStatistics(), ATExecSetStorage(), change_owner_fix_column_acls(), changeDependenciesOf(), changeDependenciesOn(), changeDependencyFor(), clear_subscription_skip_lsn(), ConstraintSetParentConstraint(), copy_table_data(), create_toast_table(), CreateComments(), CreateProceduralLanguage(), CreateSharedComments(), CreateTransform(), CreateTriggerFiringOn(), DefineIndex(), DelRoleMems(), DetachPartitionFinalize(), DisableSubscription(), dropconstraint_internal(), EnableDisableRule(), EnableDisableTrigger(), ExecGrant_Attribute(), ExecGrant_common(), ExecGrant_Largeobject(), ExecGrant_Parameter(), ExecGrant_Relation(), extension_config_remove(), finish_heap_swap(), index_build(), index_concurrently_swap(), index_constraint_create(), index_set_state_flags(), InsertRule(), mark_index_clustered(), MarkInheritDetached(), MergeAttributesIntoExisting(), MergeConstraintsIntoExisting(), MergeWithExistingConstraint(), movedb(), OperatorCreate(), OperatorUpd(), pg_extension_config_dump(), ProcedureCreate(), QueueCheckConstraintValidation(), QueueFKConstraintValidation(), recordExtensionInitPrivWorker(), reindex_index(), relation_mark_replica_identity(), relation_statistics_update(), RelationClearMissing(), RelationSetNewRelfilenumber(), RemoveAttrDefaultById(), RemoveAttributeById(), RemoveConstraintById(), RemoveInheritance(), RemoveRoleFromInitPriv(), RemoveRoleFromObjectPolicy(), rename_policy(), renameatt_internal(), RenameConstraintById(), RenameDatabase(), RenameEnumLabel(), RenameRelationInternal(), RenameRewriteRule(), RenameRole(), RenameSchema(), RenameTableSpace(), renametrig_internal(), RenameTypeInternal(), RenumberEnumType(), ReplaceRoleInInitPriv(), ResetRelRewrite(), set_attnotnull(), SetAttrMissing(), SetDatabaseHasLoginEventTriggers(), SetDefaultACL(), SetIndexStorageProperties(), SetMatViewPopulatedState(), SetRelationHasSubclass(), SetRelationNumChecks(), SetRelationRuleStatus(), SetRelationTableSpace(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepChangeDep(), StoreAttrDefault(), StorePartitionBound(), TriggerSetParentTrigger(), TypeCreate(), update_default_partition_oid(), update_relispartition(), UpdateSubscriptionRelState(), UpdateTwoPhaseState(), upsert_pg_statistic(), and validatePartitionedIndex().
void CatalogTupleUpdateWithInfo | ( | Relation | heapRel, |
ItemPointer | otid, | ||
HeapTuple | tup, | ||
CatalogIndexState | indstate | ||
) |
Definition at line 337 of file indexing.c.
References CatalogIndexInsert(), CatalogTupleCheckConstraints, simple_heap_update(), and TU_All.
Referenced by inv_truncate(), inv_write(), MakeConfigurationMapping(), swap_relation_files(), and update_attstats().