PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/heaptoast.h"
#include "access/sysattr.h"
#include "access/tupdesc_details.h"
#include "common/hashfn.h"
#include "utils/datum.h"
#include "utils/expandeddatum.h"
#include "utils/hsearch.h"
#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
struct | missing_cache_key |
Macros | |
#define | ATT_IS_PACKABLE(att) ((att)->attlen == -1 && (att)->attstorage != TYPSTORAGE_PLAIN) |
#define | VARLENA_ATT_IS_PACKABLE(att) ((att)->attstorage != TYPSTORAGE_PLAIN) |
#define | COMPACT_ATTR_IS_PACKABLE(att) ((att)->attlen == -1 && (att)->attispackable) |
Variables | |
static HTAB * | missing_cache = NULL |
#define ATT_IS_PACKABLE | ( | att | ) | ((att)->attlen == -1 && (att)->attstorage != TYPSTORAGE_PLAIN) |
Definition at line 80 of file heaptuple.c.
#define COMPACT_ATTR_IS_PACKABLE | ( | att | ) | ((att)->attlen == -1 && (att)->attispackable) |
Definition at line 87 of file heaptuple.c.
#define VARLENA_ATT_IS_PACKABLE | ( | att | ) | ((att)->attstorage != TYPSTORAGE_PLAIN) |
Definition at line 83 of file heaptuple.c.
|
static |
Definition at line 830 of file heaptuple.c.
References AttrMissing::am_value, Assert, att_addlength_pointer, att_datum_alignby, CompactAttribute::attalignby, CompactAttribute::attlen, attnum, BITMAPLEN, TupleDescData::constr, fill_val(), HeapTupleHasNulls, HeapTupleHeaderGetNatts, HeapTupleHeaderSetDatumLength, HeapTupleHeaderSetNatts, HeapTupleHeaderSetTypeId, HeapTupleHeaderSetTypMod, HEAPTUPLESIZE, ItemPointerSetInvalid(), len, MAXALIGN, MINIMAL_TUPLE_OFFSET, TupleConstr::missing, TupleDescData::natts, palloc0(), SizeofMinimalTupleHeader, HeapTupleHeaderData::t_ctid, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, HeapTupleHeaderData::t_infomask, HeapTupleData::t_len, HeapTupleData::t_self, HeapTupleData::t_tableOid, TupleDescData::tdtypeid, TupleDescData::tdtypmod, and TupleDescCompactAttr().
Referenced by heap_expand_tuple(), and minimal_expand_tuple().
|
inlinestatic |
Definition at line 275 of file heaptuple.c.
References Assert, att_nominal_alignby, CompactAttribute::attalignby, CompactAttribute::attbyval, CompactAttribute::attispackable, CompactAttribute::attlen, bit(), data, DatumGetCString(), DatumGetEOHP(), DatumGetPointer(), EOH_flatten_into(), EOH_get_flat_size(), HEAP_HASEXTERNAL, HEAP_HASNULL, HEAP_HASVARWIDTH, HIGHBIT, SET_VARSIZE_SHORT, store_att_byval(), val, VARATT_CAN_MAKE_SHORT, VARATT_CONVERTED_SHORT_SIZE, VARATT_IS_EXTERNAL, VARATT_IS_EXTERNAL_EXPANDED, VARATT_IS_SHORT, VARDATA, VARSIZE, VARSIZE_EXTERNAL, and VARSIZE_SHORT.
Referenced by expand_tuple(), and heap_fill_tuple().
Definition at line 151 of file heaptuple.c.
References AttrMissing::am_present, AttrMissing::am_value, Assert, CompactAttribute::attbyval, CompactAttribute::atthasmissing, CompactAttribute::attlen, attnum, TupleDescData::constr, datumCopy(), HASH_ENTER, hash_search(), init_missing_cache(), sort-test::key, MemoryContextSwitchTo(), TupleConstr::missing, missing_cache, PointerGetDatum(), TopMemoryContext, TupleDescCompactAttr(), missing_cache_key::value, and VARSIZE_ANY.
Referenced by heap_getattr().
Definition at line 456 of file heaptuple.c.
References Assert, att_isnull(), attnum, elog, ERROR, HeapTupleHeaderGetNatts, HeapTupleNoNulls, MaxCommandIdAttributeNumber, MaxTransactionIdAttributeNumber, MinCommandIdAttributeNumber, MinTransactionIdAttributeNumber, SelfItemPointerAttributeNumber, HeapTupleHeaderData::t_bits, HeapTupleData::t_data, TableOidAttributeNumber, and TupleDescCompactAttr().
Referenced by AlterPublicationOptions(), AlterPublicationSchemas(), build_function_result_tupdesc_t(), check_index_is_clusterable(), CheckIndexCompatible(), ExecEvalRowNullInt(), ExecuteCallStmt(), fmgr_info_cxt_security(), fmgr_symbol(), get_func_result_name(), index_drop(), inline_function(), inline_set_returning_function(), IsIndexUsableForReplicaIdentityFull(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_statisticsobj_worker(), pg_get_statisticsobjdef_expressions(), RelationGetDummyIndexExpressions(), RelationGetIndexExpressions(), RelationGetIndexList(), RelationGetIndexPredicate(), statext_is_kind_built(), and transformFkeyCheckAttrs().
Definition at line 219 of file heaptuple.c.
References att_addlength_datum, att_datum_alignby, att_nominal_alignby, CompactAttribute::attalignby, CompactAttribute::attlen, COMPACT_ATTR_IS_PACKABLE, DatumGetEOHP(), DatumGetPointer(), EOH_get_flat_size(), i, TupleDescData::natts, TupleDescCompactAttr(), val, values, VARATT_CAN_MAKE_SHORT, VARATT_CONVERTED_SHORT_SIZE, and VARATT_IS_EXTERNAL_EXPANDED.
Referenced by brin_form_tuple(), ER_get_flat_size(), heap_form_minimal_tuple(), heap_form_tuple(), heap_toast_insert_or_update(), index_form_tuple_context(), spgFormLeafTuple(), SpGistGetLeafTupleSize(), and toast_flatten_tuple_to_datum().
MinimalTuple heap_copy_minimal_tuple | ( | MinimalTuple | mtup | ) |
Definition at line 1536 of file heaptuple.c.
References palloc(), and MinimalTupleData::t_len.
Referenced by gm_readnext_tuple(), tts_minimal_copy_minimal_tuple(), tts_minimal_materialize(), tuplesort_gettupleslot(), and tuplestore_gettupleslot().
Definition at line 1081 of file heaptuple.c.
References HeapTupleHasExternal, HeapTupleHeaderSetDatumLength, HeapTupleHeaderSetTypeId, HeapTupleHeaderSetTypMod, palloc(), PointerGetDatum(), HeapTupleData::t_data, HeapTupleData::t_len, TupleDescData::tdtypeid, TupleDescData::tdtypmod, and toast_flatten_tuple_to_datum().
Referenced by ExecEvalConvertRowtype(), ExecFetchSlotHeapTupleDatum(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLySequence_ToComposite(), serialize_expr_stats(), and SPI_returntuple().
Definition at line 778 of file heaptuple.c.
References HeapTupleIsValid, HEAPTUPLESIZE, palloc(), HeapTupleData::t_data, HeapTupleData::t_len, HeapTupleData::t_self, and HeapTupleData::t_tableOid.
Referenced by AlterConstraintNamespaces(), AlterDomainValidateConstraint(), AlterExtensionNamespace(), AlterSequence(), AlterTypeOwner(), ATExecAlterConstrRecurse(), ATExecValidateConstraint(), CatalogCacheCreateEntry(), changeDependenciesOf(), changeDependenciesOn(), changeDependencyFor(), ConstraintSetParentConstraint(), CopyStatistics(), CreateTriggerFiringOn(), DefineIndex(), dropconstraint_internal(), EnableDisableTrigger(), ExecForceStoreHeapTuple(), expanded_record_set_tuple(), findDomainNotNullConstraint(), findNotNullConstraintAttnum(), get_catalog_object_by_oid_extended(), GetDatabaseTuple(), GetDatabaseTupleByOid(), index_concurrently_swap(), make_expanded_record_from_datum(), MarkInheritDetached(), MergeConstraintsIntoExisting(), MergeWithExistingConstraint(), RelationInitIndexAccessInfo(), RemoveInheritance(), rename_policy(), RenameEnumLabel(), RenameTableSpace(), renametrig_internal(), RenumberEnumType(), ResetSequence(), rewrite_heap_tuple(), ScanPgRelation(), SearchSysCacheCopy(), SearchSysCacheCopyAttName(), SearchSysCacheCopyAttNum(), SearchSysCacheLockedCopy1(), shdepChangeDep(), SPI_copytuple(), statext_expressions_load(), systable_inplace_update_begin(), TriggerSetParentTrigger(), tts_buffer_heap_copy_heap_tuple(), tts_buffer_heap_materialize(), tts_heap_copy_heap_tuple(), tts_heap_materialize(), and tuplesort_putheaptuple().
Definition at line 804 of file heaptuple.c.
References generate_unaccent_rules::dest, HeapTupleIsValid, palloc(), HeapTupleData::t_data, HeapTupleData::t_len, HeapTupleData::t_self, and HeapTupleData::t_tableOid.
Definition at line 1346 of file heaptuple.c.
References att_addlength_pointer, att_isnull(), att_nominal_alignby, att_pointer_alignby, CompactAttribute::attalignby, CompactAttribute::attcacheoff, CompactAttribute::attlen, attnum, fetchatt, for(), HeapTupleHasNulls, HeapTupleHeaderGetNatts, Min, TupleDescData::natts, HeapTupleHeaderData::t_bits, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, TupleDescCompactAttr(), and values.
Referenced by attribute_statistics_update(), deconstruct_expanded_record(), exec_move_row(), ExecEvalFieldStoreDeForm(), ExecForceStoreHeapTuple(), ExecForceStoreMinimalTuple(), ExecStoreHeapTupleDatum(), execute_attr_map_tuple(), ExtractReplicaIdentity(), hash_record(), hash_record_extended(), heap_modify_tuple(), heap_modify_tuple_by_cols(), heap_toast_delete(), heap_toast_insert_or_update(), hstore_from_record(), hstore_populate_record(), make_tuple_indirect(), populate_record(), record_cmp(), record_eq(), record_image_cmp(), record_image_eq(), record_out(), record_send(), reform_and_rewrite_tuple(), ReorderBufferToastReplace(), RI_Initial_Check(), RI_PartitionRemove_Check(), SPI_modifytuple(), toast_flatten_tuple(), and toast_flatten_tuple_to_datum().
Definition at line 1066 of file heaptuple.c.
References expand_tuple().
void heap_fill_tuple | ( | TupleDesc | tupleDesc, |
const Datum * | values, | ||
const bool * | isnull, | ||
char * | data, | ||
Size | data_size, | ||
uint16 * | infomask, | ||
bits8 * | bit | ||
) |
Definition at line 401 of file heaptuple.c.
References Assert, bit(), data, fill_val(), HEAP_HASEXTERNAL, HEAP_HASNULL, HEAP_HASVARWIDTH, HIGHBIT, i, TupleDescData::natts, PointerGetDatum(), start, TupleDescCompactAttr(), and values.
Referenced by brin_form_tuple(), ER_flatten_into(), heap_form_minimal_tuple(), heap_form_tuple(), heap_toast_insert_or_update(), index_form_tuple_context(), spgFormLeafTuple(), and toast_flatten_tuple_to_datum().
MinimalTuple heap_form_minimal_tuple | ( | TupleDesc | tupleDescriptor, |
const Datum * | values, | ||
const bool * | isnull | ||
) |
Definition at line 1453 of file heaptuple.c.
References BITMAPLEN, ereport, errcode(), errmsg(), ERROR, heap_compute_data_size(), heap_fill_tuple(), HeapTupleHeaderSetNatts, i, len, MAXALIGN, MaxTupleAttributeNumber, MINIMAL_TUPLE_OFFSET, TupleDescData::natts, palloc0(), SizeofMinimalTupleHeader, MinimalTupleData::t_bits, MinimalTupleData::t_hoff, MinimalTupleData::t_infomask, MinimalTupleData::t_len, and values.
Referenced by tts_minimal_materialize(), tts_virtual_copy_minimal_tuple(), and tuplestore_putvalues().
Definition at line 1117 of file heaptuple.c.
References BITMAPLEN, ereport, errcode(), errmsg(), ERROR, heap_compute_data_size(), heap_fill_tuple(), HeapTupleHeaderSetDatumLength, HeapTupleHeaderSetNatts, HeapTupleHeaderSetTypeId, HeapTupleHeaderSetTypMod, HEAPTUPLESIZE, i, InvalidOid, ItemPointerSetInvalid(), len, MAXALIGN, MaxTupleAttributeNumber, TupleDescData::natts, palloc0(), HeapTupleHeaderData::t_bits, HeapTupleHeaderData::t_ctid, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, HeapTupleHeaderData::t_infomask, HeapTupleData::t_len, HeapTupleData::t_self, HeapTupleData::t_tableOid, TupleDescData::tdtypeid, TupleDescData::tdtypmod, and values.
Referenced by aclexplode(), AddEnumLabel(), AddRoleMems(), AddSubscriptionRelState(), AggregateCreate(), AlterSetting(), brin_metapage_info(), bt_page_print_tuples(), BuildTupleFromCStrings(), CastCreate(), CollationCreate(), ConversionCreate(), copy_replication_slot(), 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(), each_object_field_end(), elements_array_element_end(), ExecEvalFieldStoreForm(), ExecEvalRow(), execute_attr_map_tuple(), expanded_record_get_tuple(), ExtractReplicaIdentity(), file_acquire_sample_rows(), fill_hba_line(), fill_ident_line(), gin_leafpage_items(), gin_metapage_info(), gin_page_opaque_info(), gist_page_opaque_info(), gistFetchTuple(), hash_bitmap_info(), hash_metapage_info(), hash_page_items(), hash_page_stats(), heap_modify_tuple(), heap_modify_tuple_by_cols(), heap_page_items(), heap_tuple_infomask_flags(), hstore_each(), hstore_populate_record(), injection_points_stats_fixed(), insert_event_trigger_tuple(), InsertExtensionTuple(), InsertOneTuple(), InsertPgClassTuple(), InsertRule(), inv_truncate(), inv_write(), LargeObjectCreate(), make_tuple_from_result_row(), make_tuple_from_row(), make_tuple_indirect(), NamespaceCreate(), OperatorCreate(), OperatorShellMake(), page_header(), ParameterAclCreate(), pg_available_wal_summaries(), pg_backup_stop(), pg_buffercache_pages(), pg_buffercache_summary(), pg_control_checkpoint(), pg_control_init(), pg_control_recovery(), pg_control_system(), pg_create_logical_replication_slot(), pg_create_physical_replication_slot(), pg_get_catalog_foreign_keys(), pg_get_logical_snapshot_info(), pg_get_logical_snapshot_meta(), pg_get_object_address(), pg_get_publication_tables(), pg_get_sequence_data(), pg_get_wal_record_info(), pg_get_wal_summarizer_state(), pg_identify_object(), pg_identify_object_as_address(), pg_input_error_info(), pg_last_committed_xact(), pg_lock_status(), pg_partition_tree(), pg_prepared_xact(), pg_replication_slot_advance(), pg_sequence_parameters(), pg_split_walfile_name(), pg_stat_file(), pg_stat_get_archiver(), pg_stat_get_backend_subxact(), pg_stat_get_replication_slot(), pg_stat_get_subscription_stats(), pg_stat_get_wal(), pg_stat_get_wal_receiver(), pg_stat_statements_info(), pg_stats_ext_mcvlist_items(), pg_timezone_abbrevs(), pg_visibility(), pg_visibility_map(), pg_visibility_map_rel(), pg_visibility_map_summary(), pg_visibility_rel(), pg_wal_summary_contents(), pg_walfile_name_offset(), pg_xact_commit_timestamp_origin(), pgstatginindex_internal(), pgstathashindex(), pgstattuple_approx_internal(), plperl_build_tuple_result(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLySequence_ToComposite(), populate_record(), ProcedureCreate(), publication_add_relation(), publication_add_schema(), RangeCreate(), record_in(), record_recv(), recordExtensionInitPrivWorker(), reform_and_rewrite_tuple(), ReorderBufferToastReplace(), replorigin_create(), report_corruption_internal(), serialize_expr_stats(), SetDefaultACL(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepAddDependency(), shdepChangeDep(), SPI_modifytuple(), ssl_extension_info(), statext_store(), StoreAttrDefault(), storeGettuple(), storeOperators(), StorePartitionKey(), storeProcedures(), StoreSingleInheritance(), test_enc_conversion(), test_predtest(), toast_build_flattened_tuple(), toast_flatten_tuple(), toast_save_datum(), tsvector_unnest(), tts_buffer_heap_materialize(), tts_heap_materialize(), tts_virtual_copy_heap_tuple(), TypeCreate(), TypeShellMake(), update_attstats(), UpdateIndexRelation(), and upsert_pg_statistic().
void heap_free_minimal_tuple | ( | MinimalTuple | mtup | ) |
Definition at line 1524 of file heaptuple.c.
References pfree().
Referenced by ExecHashJoinImpl(), ExecHashSkewTableInsert(), ExecHashTableInsert(), ExecParallelHashJoinPartitionOuter(), ExecParallelHashTableInsert(), ExecParallelHashTableInsertCurrentBatch(), tts_minimal_clear(), and writetup_heap().
void heap_freetuple | ( | HeapTuple | htup | ) |
Definition at line 1435 of file heaptuple.c.
References pfree().
Referenced by acquire_inherited_sample_rows(), acquire_sample_rows(), AddEnumLabel(), AddSubscriptionRelState(), AfterTriggerExecute(), AlterCollation(), AlterDatabaseOwner(), AlterDatabaseRefreshColl(), AlterDomainDefault(), AlterDomainNotNull(), AlterDomainValidateConstraint(), AlterEventTrigger(), AlterEventTriggerOwner(), AlterEventTriggerOwner_oid(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner(), AlterForeignDataWrapperOwner_oid(), AlterForeignServer(), AlterForeignServerOwner(), AlterForeignServerOwner_oid(), AlterFunction(), AlterObjectRename_internal(), AlterPolicy(), AlterPublication(), AlterPublicationOwner(), AlterPublicationOwner_oid(), AlterRelationNamespaceInternal(), AlterRole(), AlterSchemaOwner_internal(), AlterStatistics(), AlterSubscription(), AlterSubscriptionOwner(), AlterSubscriptionOwner_oid(), AlterTableSpaceOptions(), AlterTSDictionary(), AlterTypeNamespaceInternal(), AlterUserMapping(), analyze_row_processor(), ATExecAddColumn(), ATExecAddIdentity(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstrRecurse(), ATExecChangeOwner(), ATExecDropColumn(), ATExecDropExpression(), ATExecDropIdentity(), ATExecDropNotNull(), ATExecDropOf(), ATExecForceNoForceRowSecurity(), ATExecGenericOptions(), ATExecSetAccessMethodNoStorage(), ATExecSetCompression(), ATExecSetIdentity(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetRowSecurity(), ATExecSetStatistics(), ATExecSetStorage(), ATExecValidateConstraint(), build_tuplestore_recursively(), CastCreate(), CatalogCacheCreateEntry(), CatalogTuplesMultiInsertWithInfo(), change_owner_fix_column_acls(), changeDependenciesOf(), changeDependenciesOn(), changeDependencyFor(), clear_subscription_skip_lsn(), CollationCreate(), ConversionCreate(), copy_table_data(), CopyStatistics(), create_toast_table(), CreateAccessMethod(), CreateComments(), CreateForeignDataWrapper(), CreateForeignServer(), CreateForeignTable(), CreateOpFamily(), CreatePolicy(), CreatePublication(), CreateSharedComments(), CreateStatistics(), CreateSubscription(), CreateTableSpace(), CreateTransform(), CreateTriggerFiringOn(), CreateUserMapping(), crosstab(), DefineIndex(), DefineOpClass(), DefineSequence(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), DetachPartitionFinalize(), DisableSubscription(), dropconstraint_internal(), dropdb(), EnableDisableRule(), EnableDisableTrigger(), EventTriggerOnLogin(), examine_attribute(), examine_expression(), ExecBRDeleteTriggers(), ExecBRInsertTriggers(), ExecBRUpdateTriggers(), ExecIRDeleteTriggers(), ExecIRInsertTriggers(), ExecIRUpdateTriggers(), ExecReScanAgg(), ExecReScanIndexScan(), ExecScanSubPlan(), ExecSetParamPlan(), expanded_record_set_tuple(), ExtractReplicaIdentity(), file_acquire_sample_rows(), heap_delete(), heap_insert(), heap_update(), index_build(), index_concurrently_swap(), index_constraint_create(), index_update_stats(), insert_event_trigger_tuple(), InsertExtensionTuple(), InsertOneTuple(), InsertPgClassTuple(), InsertRule(), inv_truncate(), inv_write(), LargeObjectCreate(), mark_index_clustered(), MarkInheritDetached(), MergeAttributesIntoExisting(), MergeConstraintsIntoExisting(), OperatorShellMake(), ParameterAclCreate(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLySequence_ToComposite(), ProcedureCreate(), publication_add_relation(), publication_add_schema(), RangeCreate(), raw_heap_insert(), record_in(), record_recv(), reform_and_rewrite_tuple(), relation_mark_replica_identity(), relation_statistics_update(), RelationBuildDesc(), RelationClearMissing(), RelationInitPhysicalAddr(), RelationReloadIndexInfo(), RelationReloadNailed(), RelationSetNewRelfilenumber(), RemoveConstraintById(), RemoveInheritance(), RemoveRoleFromObjectPolicy(), renameatt_internal(), RenameConstraintById(), RenameEnumLabel(), RenameRelationInternal(), RenameRewriteRule(), RenameSchema(), RenameTypeInternal(), RenumberEnumType(), replorigin_create(), ResetRelRewrite(), rewrite_heap_dead_tuple(), rewrite_heap_tuple(), set_attnotnull(), SetDatabaseHasLoginEventTriggers(), SetIndexStorageProperties(), SetMatViewPopulatedState(), SetRelationHasSubclass(), SetRelationNumChecks(), SetRelationRuleStatus(), SetRelationTableSpace(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepAddDependency(), shdepChangeDep(), SPI_freetuple(), statext_store(), StoreAttrDefault(), storeOperators(), StorePartitionBound(), storeProcedures(), StoreSingleInheritance(), swap_relation_files(), table_recheck_autovac(), toast_save_datum(), TriggerSetParentTrigger(), tts_buffer_heap_clear(), tts_buffer_heap_store_tuple(), tts_heap_clear(), TypeShellMake(), update_attstats(), update_default_partition_oid(), update_relispartition(), UpdateIndexRelation(), UpdateTwoPhaseState(), upsert_pg_statistic(), vac_update_datfrozenxid(), validatePartitionedIndex(), and xpath_table().
Definition at line 725 of file heaptuple.c.
References Assert, attnum, CommandIdGetDatum(), elog, ERROR, HeapTupleHeaderGetRawCommandId, HeapTupleHeaderGetRawXmax, HeapTupleHeaderGetRawXmin, MaxCommandIdAttributeNumber, MaxTransactionIdAttributeNumber, MinCommandIdAttributeNumber, MinTransactionIdAttributeNumber, ObjectIdGetDatum(), PointerGetDatum(), SelfItemPointerAttributeNumber, HeapTupleData::t_data, HeapTupleData::t_self, HeapTupleData::t_tableOid, TableOidAttributeNumber, and TransactionIdGetDatum().
Referenced by expanded_record_fetch_field(), heap_getattr(), tts_buffer_heap_getsysattr(), and tts_heap_getsysattr().
HeapTuple heap_modify_tuple | ( | HeapTuple | tuple, |
TupleDesc | tupleDesc, | ||
const Datum * | replValues, | ||
const bool * | replIsnull, | ||
const bool * | doReplace | ||
) |
Definition at line 1210 of file heaptuple.c.
References heap_deform_tuple(), heap_form_tuple(), TupleDescData::natts, palloc(), pfree(), HeapTupleHeaderData::t_ctid, HeapTupleData::t_data, HeapTupleData::t_self, HeapTupleData::t_tableOid, and values.
Referenced by AddRoleMems(), AggregateCreate(), AlterCollation(), AlterDatabase(), AlterDatabaseOwner(), AlterDatabaseRefreshColl(), AlterDomainDefault(), 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(), ApplyExtensionUpdates(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecChangeOwner(), ATExecGenericOptions(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), change_owner_fix_column_acls(), clear_subscription_skip_lsn(), CreateComments(), CreateProceduralLanguage(), CreateSharedComments(), CreateTransform(), DelRoleMems(), DetachPartitionFinalize(), DisableSubscription(), ExecGrant_Attribute(), ExecGrant_common(), ExecGrant_Largeobject(), ExecGrant_Parameter(), ExecGrant_Relation(), extension_config_remove(), index_concurrently_swap(), InsertRule(), inv_truncate(), inv_write(), MakeConfigurationMapping(), movedb(), OperatorCreate(), pg_extension_config_dump(), plperl_modify_tuple(), PLy_modify_tuple(), ProcedureCreate(), recordExtensionInitPrivWorker(), RelationClearMissing(), RemoveAttributeById(), RemoveRoleFromInitPriv(), RemoveRoleFromObjectPolicy(), RenameRole(), ReplaceRoleInInitPriv(), SetAttrMissing(), SetDefaultACL(), SetSecurityLabel(), SetSharedSecurityLabel(), StoreAttrDefault(), StorePartitionBound(), TypeCreate(), update_attstats(), UpdateSubscriptionRelState(), UpdateTwoPhaseState(), and upsert_pg_statistic().
HeapTuple heap_modify_tuple_by_cols | ( | HeapTuple | tuple, |
TupleDesc | tupleDesc, | ||
int | nCols, | ||
const int * | replCols, | ||
const Datum * | replValues, | ||
const bool * | replIsnull | ||
) |
Definition at line 1278 of file heaptuple.c.
References attnum, elog, ERROR, heap_deform_tuple(), heap_form_tuple(), i, TupleDescData::natts, palloc(), pfree(), HeapTupleHeaderData::t_ctid, HeapTupleData::t_data, HeapTupleData::t_self, HeapTupleData::t_tableOid, and values.
Referenced by autoinc(), insert_username(), moddatetime(), relation_statistics_update(), and tsvector_update_trigger().
HeapTuple heap_tuple_from_minimal_tuple | ( | MinimalTuple | mtup | ) |
Definition at line 1555 of file heaptuple.c.
References HEAPTUPLESIZE, InvalidOid, ItemPointerSetInvalid(), len, MINIMAL_TUPLE_OFFSET, palloc(), HeapTupleData::t_data, HeapTupleData::t_len, MinimalTupleData::t_len, HeapTupleData::t_self, and HeapTupleData::t_tableOid.
Referenced by tts_minimal_copy_heap_tuple().
|
static |
Definition at line 126 of file heaptuple.c.
References HASHCTL::entrysize, HASHCTL::hash, HASH_COMPARE, HASH_CONTEXT, hash_create(), HASH_ELEM, HASH_FUNCTION, HASHCTL::hcxt, HASHCTL::keysize, HASHCTL::match, missing_cache, missing_hash(), missing_match(), and TopMemoryContext.
Referenced by getmissingattr().
MinimalTuple minimal_expand_tuple | ( | HeapTuple | sourceTuple, |
TupleDesc | tupleDesc | ||
) |
Definition at line 1054 of file heaptuple.c.
References expand_tuple().
MinimalTuple minimal_tuple_from_heap_tuple | ( | HeapTuple | htup | ) |
Definition at line 1577 of file heaptuple.c.
References Assert, len, MINIMAL_TUPLE_OFFSET, palloc(), HeapTupleData::t_data, HeapTupleData::t_len, and MinimalTupleData::t_len.
Referenced by copytup_heap(), tts_buffer_heap_copy_minimal_tuple(), and tts_heap_copy_minimal_tuple().
Definition at line 104 of file heaptuple.c.
References hash_bytes(), sort-test::key, missing_cache_key::len, and missing_cache_key::value.
Referenced by init_missing_cache().
|
static |
Definition at line 112 of file heaptuple.c.
References DatumGetPointer(), missing_cache_key::len, and missing_cache_key::value.
Referenced by init_missing_cache().
Definition at line 521 of file heaptuple.c.
References Assert, att_addlength_pointer, att_isnull(), att_nominal_alignby, att_pointer_alignby, CompactAttribute::attalignby, CompactAttribute::attcacheoff, CompactAttribute::attlen, attlen, attnum, fetchatt, HeapTupleHasNulls, HeapTupleHasVarWidth, HeapTupleNoNulls, i, if(), j, TupleDescData::natts, HeapTupleHeaderData::t_bits, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, and TupleDescCompactAttr().
Referenced by fastgetattr().
size_t varsize_any | ( | void * | p | ) |
Definition at line 1595 of file heaptuple.c.
References VARSIZE_ANY.
|
static |
Definition at line 101 of file heaptuple.c.
Referenced by getmissingattr(), and init_missing_cache().