Header And Logo

PostgreSQL
| The world's most advanced open source database.

Data Structures | Defines | Typedefs | Functions

htup.h File Reference

#include "storage/itemptr.h"
Include dependency graph for htup.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HeapTupleData

Defines

#define HEAPTUPLESIZE   MAXALIGN(sizeof(HeapTupleData))
#define HeapTupleIsValid(tuple)   PointerIsValid(tuple)

Typedefs

typedef struct HeapTupleHeaderData HeapTupleHeaderData
typedef HeapTupleHeaderDataHeapTupleHeader
typedef struct MinimalTupleData MinimalTupleData
typedef MinimalTupleDataMinimalTuple
typedef struct HeapTupleData HeapTupleData
typedef HeapTupleDataHeapTuple

Functions

CommandId HeapTupleHeaderGetCmin (HeapTupleHeader tup)
CommandId HeapTupleHeaderGetCmax (HeapTupleHeader tup)
void HeapTupleHeaderAdjustCmax (HeapTupleHeader tup, CommandId *cmax, bool *iscombo)
TransactionId HeapTupleGetUpdateXid (HeapTupleHeader tuple)

Define Documentation

#define HeapTupleIsValid (   tuple  )     PointerIsValid(tuple)

Definition at line 77 of file htup.h.

Referenced by aclitemout(), AddEnumLabel(), AddRoleMems(), AfterTriggerSetState(), AggregateCreate(), AlterConstraintNamespaces(), AlterDatabase(), AlterDatabaseOwner(), AlterDomainAddConstraint(), AlterDomainDefault(), AlterDomainDropConstraint(), AlterDomainNotNull(), AlterDomainValidateConstraint(), AlterEnum(), AlterEventTrigger(), AlterEventTriggerOwner(), AlterEventTriggerOwner_oid(), AlterExtensionNamespace(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner(), AlterForeignDataWrapperOwner_oid(), AlterForeignServer(), AlterForeignServerOwner(), AlterForeignServerOwner_oid(), AlterFunction(), AlterObjectNamespace_internal(), AlterObjectRename_internal(), AlterOpFamily(), AlterRelationNamespaceInternal(), AlterRole(), AlterRoleSet(), AlterSchemaOwner(), AlterSchemaOwner_oid(), AlterSeqNamespaces(), AlterSetting(), AlterTableSpaceOptions(), AlterTSConfiguration(), AlterTSDictionary(), AlterTypeNamespaceInternal(), AlterTypeOwnerInternal(), AlterUserMapping(), ApplyExtensionUpdates(), ApplySetting(), array_to_json_internal(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATExecAddInherit(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecChangeOwner(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropInherit(), ATExecDropNotNull(), ATExecDropOf(), ATExecGenericOptions(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSetTableSpace(), ATExecValidateConstraint(), ATPrepAlterColumnType(), AttrDefaultFetch(), booltestsel(), btcostestimate(), build_coercion_expression(), BuildEventTriggerCache(), CacheInvalidateRelcacheByRelid(), calc_arraycontsel(), calc_hist_selectivity(), calc_rangesel(), change_owner_fix_column_acls(), change_owner_recurse_to_sequences(), changeDependencyFor(), check_for_column_name_collision(), check_functional_grouping(), check_role(), check_session_authorization(), check_TSCurrentConfig(), CheckConstraintFetch(), CheckIndexCompatible(), CheckMyDatabase(), CheckRelationOwnership(), checkSharedDependencies(), ChooseConstraintName(), cluster(), cluster_rel(), CollationIsVisible(), column_privilege_check(), compile_plperl_function(), compile_pltcl_function(), composite_to_json(), ComputeIndexAttrs(), ConstraintNameIsUsed(), ConstructTupleDescriptor(), ConversionIsVisible(), copyTemplateDependencies(), count_agg_clauses_walker(), create_proc_lang(), create_toast_table(), CreateCast(), CreateEventTrigger(), CreateFunction(), CreateTrigger(), DefineCollation(), DefineIndex(), DefineOpClass(), DefineQueryRewrite(), DefineTSConfiguration(), deleteDependencyRecordsFor(), deleteDependencyRecordsForClass(), deleteOneObject(), DeleteRelationTuple(), DeleteSecurityLabel(), DeleteSharedSecurityLabel(), DelRoleMems(), deparseFuncExpr(), deparseOpExpr(), deparseScalarArrayOpExpr(), do_autovacuum(), do_compile(), drop_parent_dependency(), DropCastById(), DropConfigurationMapping(), dropDatabaseDependencies(), dropdb(), DropProceduralLanguageById(), DropRole(), DropSetting(), DropTableSpace(), EnableDisableRule(), EnableDisableTrigger(), enum_cmp_internal(), enum_endpoint(), enum_in(), enum_out(), enum_range_internal(), enum_recv(), enum_send(), EnumValuesDelete(), eqjoinsel_inner(), eqjoinsel_semi(), errdatatype(), estimate_hash_bucketsize(), estimate_num_groups(), examine_attribute(), examine_simple_variable(), examine_variable(), exec_assign_value(), exec_eval_datum(), exec_move_row(), exec_object_restorecon(), exec_stmt_return(), exec_stmt_return_next(), ExecAlterExtensionStmt(), ExecGrant_Attribute(), ExecGrant_Database(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Largeobject(), ExecGrant_Namespace(), ExecGrant_Relation(), ExecGrant_Tablespace(), ExecGrant_Type(), ExecHashBuildSkewHash(), ExecInitAgg(), ExecuteDoStmt(), expand_all_col_privileges(), extension_config_remove(), fetch_agg_sort_op(), fetch_fp_info(), find_coercion_pathway(), find_composite_type_dependencies(), find_language_template(), find_typmod_coercion_function(), findDependentObjects(), 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_attavgwidth(), get_attname(), get_attnum(), get_attribute_options(), get_attstatsslot(), get_atttype(), get_atttypetypmodcoll(), get_atttypmod(), get_base_element_type(), get_catalog_object_by_oid(), get_collation(), get_collation_name(), get_commutator(), get_constraint_index(), get_constraint_name(), get_database_list(), get_database_name(), get_database_oid(), get_db_info(), get_default_acl_internal(), get_domain_constraint_oid(), get_element_type(), get_extension_name(), get_extension_oid(), get_extension_schema(), 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_index_constraint(), 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_pkey_attnames(), get_range_subtype(), get_rel_name(), get_rel_namespace(), get_rel_relkind(), get_rel_tablespace(), get_rel_type_id(), get_relation_constraint_oid(), get_rels_with_domain(), get_rewrite_oid(), get_rewrite_oid_without_relid(), get_rte_attribute_is_dropped(), get_rte_attribute_type(), get_tablespace(), get_tablespace_name(), get_tablespace_oid(), get_trigger_oid(), 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(), get_variable_numdistinct(), get_variable_range(), getBaseTypeAndTypmod(), getConstraintTypeDescription(), GetDatabaseTuple(), GetDatabaseTupleByOid(), GetDefaultOpClass(), GetDomainConstraints(), getExtensionOfObject(), GetFdwRoutineByRelId(), GetForeignColumnOptions(), GetForeignDataWrapper(), GetForeignServer(), GetForeignTable(), GetIndexOpClass(), GetNewOidWithIndex(), getObjectDescription(), getObjectIdentity(), getOpFamilyDescription(), getOpFamilyIdentity(), getOwnedSequences(), getProcedureTypeDescription(), getRelationDescription(), getRelationIdentity(), getRelationTypeDescription(), GetSecurityLabel(), GetSharedSecurityLabel(), GetSysCacheOid(), GetTSConfigTuple(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserMapping(), GetUserNameFromId(), has_createrole_privilege(), has_rolcatupdate(), has_rolinherit(), has_rolreplication(), has_subclass(), hash_ok_operator(), have_createdb_privilege(), heap_copytuple(), heap_copytuple_with_tuple(), heap_drop_with_catalog(), heap_truncate_find_FKs(), histogram_selectivity(), index_build(), index_check_primary_key(), index_constraint_create(), index_drop(), index_set_state_flags(), index_update_stats(), IndexGetRelation(), IndexSupportsBackwardScan(), ineq_histogram_selectivity(), init_sql_fcache(), initialize_peragg(), InitializeSessionUserId(), InitPostgres(), inline_set_returning_function(), InsertRule(), internal_get_result_type(), inv_getsize(), IsBinaryCoercible(), isObjectPinned(), isSharedObjectPinned(), json_agg_transfn(), LargeObjectDrop(), LargeObjectExists(), left_oper(), load_enum_cache_data(), load_rangetype_info(), lookup_collation_cache(), lookup_ts_config_cache(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), LookupAggNameTypeNames(), LookupOpclassInfo(), LookupTypeName(), ltreeparentsel(), make_new_heap(), makeConfigurationDependencies(), MakeConfigurationMapping(), map_sql_table_to_xmlschema(), map_sql_type_to_xml_name(), mark_index_clustered(), mcv_selectivity(), md5_crypt_verify(), MergeAttributesIntoExisting(), MergeConstraintsIntoExisting(), mergejoinscansel(), MergeWithExistingConstraint(), movedb(), myLargeObjectExists(), nulltestsel(), op_hashjoinable(), op_input_types(), op_mergejoinable(), OpClassCacheLookup(), OpclassIsVisible(), oper(), OperatorCreate(), OperatorGet(), OperatorIsVisible(), OperatorUpd(), OpernameGetOprid(), OpFamilyCacheLookup(), OpfamilyIsVisible(), patternsel(), 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_extension_config_dump(), pg_extension_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_triggerdef_worker(), pg_get_userbyid(), pg_language_aclmask(), pg_language_ownercheck(), pg_largeobject_aclmask_snapshot(), pg_largeobject_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(), PrepareToInvalidateCacheTuple(), ProcedureCreate(), RangeDelete(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForDropRelation(), RangeVarCallbackForRenameAttribute(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), recomputeNamespacePath(), regclassin(), regclassout(), regconfigout(), regdictionaryout(), regoperin(), regoperout(), regprocin(), regprocout(), regtypein(), regtypeout(), reindex_index(), RelationBuildDesc(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationBuildTupleDesc(), RelationCacheInitializePhase3(), RelationGetExclusionInfo(), RelationGetIndexList(), relationHasPrimaryKey(), RelationInitIndexAccessInfo(), RelationIsVisible(), RelationReloadIndexInfo(), RelationRemoveInheritance(), RelationSetNewRelfilenode(), RemoveAmOpEntryById(), RemoveAmProcEntryById(), RemoveAttrDefault(), RemoveAttrDefaultById(), RemoveAttributeById(), RemoveCollationById(), RemoveConstraintById(), RemoveConversionById(), RemoveDefaultACLById(), RemoveEventTriggerById(), RemoveExtensionById(), RemoveForeignDataWrapperById(), RemoveForeignServerById(), RemoveFunctionById(), RemoveObjects(), RemoveOpClassById(), RemoveOperatorById(), RemoveOpFamilyById(), RemoveRewriteRuleById(), RemoveRoleFromObjectACL(), RemoveSchemaById(), RemoveStatistics(), RemoveTriggerById(), RemoveTSConfigurationById(), RemoveTSDictionaryById(), RemoveTSParserById(), RemoveTSTemplateById(), RemoveTypeById(), RemoveUserMappingById(), rename_constraint_internal(), renameatt_internal(), RenameConstraint(), RenameConstraintById(), RenameDatabase(), RenameRelationInternal(), RenameRewriteRule(), RenameRole(), RenameSchema(), RenameTableSpace(), renametrig(), RenameType(), RenameTypeInternal(), ri_add_cast_to(), ri_GenerateQual(), ri_GenerateQualCollation(), ri_LoadConstraintInfo(), right_oper(), scalararraysel_containment(), scalarineqsel(), ScanPgRelation(), SearchCatCache(), SearchCatCacheList(), SearchSysCacheAttName(), SearchSysCacheCopy(), SearchSysCacheCopyAttName(), SearchSysCacheExists(), SearchSysCacheExistsAttName(), sepgsql_attribute_post_create(), sepgsql_database_post_create(), sepgsql_proc_post_create(), sepgsql_proc_setattr(), sepgsql_relation_post_create(), sepgsql_relation_setattr(), sepgsql_relation_setattr_extra(), sepgsql_schema_post_create(), sequenceIsOwned(), SetDefaultACL(), SetFunctionArgType(), SetFunctionReturnType(), SetRelationHasSubclass(), SetRelationNumChecks(), SetRelationRuleStatus(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepDropDependency(), simplify_function(), SPI_gettype(), StoreAttrDefault(), superuser_arg(), swap_relation_files(), table_recheck_autovac(), to_json(), transformArrayType(), transformColumnNameList(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), triggered_change_notification(), TriggerEnabled(), TryReuseForeignKey(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), tsquerysel(), TSTemplateIsVisible(), TupleDescInitEntry(), TypeCreate(), typeidType(), typeidTypeRelid(), typeIsOfTypedTable(), TypeIsVisible(), update_attstats(), vac_update_datfrozenxid(), vac_update_relstats(), var_eq_const(), var_eq_non_const(), and verify_dictoptions().

#define HEAPTUPLESIZE   MAXALIGN(sizeof(HeapTupleData))

Typedef Documentation

Definition at line 70 of file htup.h.

typedef struct HeapTupleData HeapTupleData

Definition at line 23 of file htup.h.

Definition at line 21 of file htup.h.

Definition at line 27 of file htup.h.

Definition at line 25 of file htup.h.


Function Documentation

TransactionId HeapTupleGetUpdateXid ( HeapTupleHeader  tuple  ) 
void HeapTupleHeaderAdjustCmax ( HeapTupleHeader  tup,
CommandId cmax,
bool iscombo 
)

Definition at line 144 of file combocid.c.

References GetComboCommandId(), HEAP_XMIN_COMMITTED, HeapTupleHeaderGetCmin(), HeapTupleHeaderGetXmin, HeapTupleHeaderData::t_infomask, and TransactionIdIsCurrentTransactionId().

Referenced by heap_delete(), and heap_update().

{
    /*
     * If we're marking a tuple deleted that was inserted by (any
     * subtransaction of) our transaction, we need to use a combo command id.
     * Test for HEAP_XMIN_COMMITTED first, because it's cheaper than a
     * TransactionIdIsCurrentTransactionId call.
     */
    if (!(tup->t_infomask & HEAP_XMIN_COMMITTED) &&
        TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmin(tup)))
    {
        CommandId   cmin = HeapTupleHeaderGetCmin(tup);

        *cmax = GetComboCommandId(cmin, *cmax);
        *iscombo = true;
    }
    else
    {
        *iscombo = false;
    }
}

CommandId HeapTupleHeaderGetCmax ( HeapTupleHeader  tup  ) 
CommandId HeapTupleHeaderGetCmin ( HeapTupleHeader  tup  )