PostgreSQL Source Code
git master
|
#include "access/htup.h"
#include "access/transam.h"
#include "access/tupdesc.h"
#include "access/tupmacs.h"
#include "storage/bufpage.h"
#include "varatt.h"
Go to the source code of this file.
Data Structures | |
struct | HeapTupleFields |
struct | DatumTupleFields |
struct | HeapTupleHeaderData |
struct | MinimalTupleData |
Typedefs | |
typedef struct HeapTupleFields | HeapTupleFields |
typedef struct DatumTupleFields | DatumTupleFields |
#define BITMAPLEN | ( | NATTS | ) | (((int)(NATTS) + 7) / 8) |
Definition at line 545 of file htup_details.h.
#define FIELDNO_HEAPTUPLEHEADERDATA_BITS 5 |
Definition at line 177 of file htup_details.h.
#define FIELDNO_HEAPTUPLEHEADERDATA_HOFF 4 |
Definition at line 172 of file htup_details.h.
#define FIELDNO_HEAPTUPLEHEADERDATA_INFOMASK 3 |
Definition at line 169 of file htup_details.h.
#define FIELDNO_HEAPTUPLEHEADERDATA_INFOMASK2 2 |
Definition at line 166 of file htup_details.h.
#define GETSTRUCT | ( | TUP | ) | ((char *) ((TUP)->t_data) + (TUP)->t_data->t_hoff) |
Definition at line 653 of file htup_details.h.
#define HEAP2_XACT_MASK 0xE000 /* visibility-related bits */ |
Definition at line 279 of file htup_details.h.
#define HEAP_COMBOCID 0x0020 /* t_cid is a combo CID */ |
Definition at line 195 of file htup_details.h.
#define HEAP_HASEXTERNAL 0x0004 /* has external stored attribute(s) */ |
Definition at line 192 of file htup_details.h.
#define HEAP_HASNULL 0x0001 /* has null attribute(s) */ |
Definition at line 190 of file htup_details.h.
#define HEAP_HASOID_OLD 0x0008 /* has an object-id field */ |
Definition at line 193 of file htup_details.h.
#define HEAP_HASVARWIDTH 0x0002 /* has variable-width attribute(s) */ |
Definition at line 191 of file htup_details.h.
#define HEAP_HOT_UPDATED 0x4000 /* tuple was HOT-updated */ |
Definition at line 276 of file htup_details.h.
#define HEAP_KEYS_UPDATED |
Definition at line 275 of file htup_details.h.
#define HEAP_LOCK_MASK |
Definition at line 202 of file htup_details.h.
#define HEAP_LOCKED_UPGRADED | ( | infomask | ) |
Definition at line 249 of file htup_details.h.
#define HEAP_MOVED (HEAP_MOVED_OFF | HEAP_MOVED_IN) |
Definition at line 213 of file htup_details.h.
#define HEAP_MOVED_IN |
Definition at line 212 of file htup_details.h.
#define HEAP_MOVED_OFF |
Definition at line 211 of file htup_details.h.
#define HEAP_NATTS_MASK 0x07FF /* 11 bits for number of attributes */ |
Definition at line 273 of file htup_details.h.
#define HEAP_ONLY_TUPLE 0x8000 /* this is heap-only tuple */ |
Definition at line 277 of file htup_details.h.
#define HEAP_TUPLE_HAS_MATCH HEAP_ONLY_TUPLE /* tuple has a join match */ |
Definition at line 287 of file htup_details.h.
#define HEAP_UPDATED 0x2000 /* this is UPDATEd version of row */ |
Definition at line 210 of file htup_details.h.
#define HEAP_XACT_MASK 0xFFF0 /* visibility-related bits */ |
Definition at line 215 of file htup_details.h.
#define HEAP_XMAX_BITS |
Definition at line 267 of file htup_details.h.
#define HEAP_XMAX_COMMITTED 0x0400 /* t_xmax committed */ |
Definition at line 207 of file htup_details.h.
#define HEAP_XMAX_EXCL_LOCK 0x0040 /* xmax is exclusive locker */ |
Definition at line 196 of file htup_details.h.
#define HEAP_XMAX_INVALID 0x0800 /* t_xmax invalid/aborted */ |
Definition at line 208 of file htup_details.h.
#define HEAP_XMAX_IS_EXCL_LOCKED | ( | infomask | ) | (((infomask) & HEAP_LOCK_MASK) == HEAP_XMAX_EXCL_LOCK) |
Definition at line 261 of file htup_details.h.
#define HEAP_XMAX_IS_KEYSHR_LOCKED | ( | infomask | ) | (((infomask) & HEAP_LOCK_MASK) == HEAP_XMAX_KEYSHR_LOCK) |
Definition at line 263 of file htup_details.h.
#define HEAP_XMAX_IS_LOCKED_ONLY | ( | infomask | ) |
Definition at line 227 of file htup_details.h.
#define HEAP_XMAX_IS_MULTI 0x1000 /* t_xmax is a MultiXactId */ |
Definition at line 209 of file htup_details.h.
#define HEAP_XMAX_IS_SHR_LOCKED | ( | infomask | ) | (((infomask) & HEAP_LOCK_MASK) == HEAP_XMAX_SHR_LOCK) |
Definition at line 259 of file htup_details.h.
#define HEAP_XMAX_KEYSHR_LOCK 0x0010 /* xmax is a key-shared locker */ |
Definition at line 194 of file htup_details.h.
Definition at line 197 of file htup_details.h.
#define HEAP_XMAX_SHR_LOCK (HEAP_XMAX_EXCL_LOCK | HEAP_XMAX_KEYSHR_LOCK) |
Definition at line 200 of file htup_details.h.
#define HEAP_XMIN_COMMITTED 0x0100 /* t_xmin committed */ |
Definition at line 204 of file htup_details.h.
#define HEAP_XMIN_FROZEN (HEAP_XMIN_COMMITTED|HEAP_XMIN_INVALID) |
Definition at line 206 of file htup_details.h.
#define HEAP_XMIN_INVALID 0x0200 /* t_xmin invalid/aborted */ |
Definition at line 205 of file htup_details.h.
#define HeapTupleAllFixed | ( | tuple | ) | (!((tuple)->t_data->t_infomask & HEAP_HASVARWIDTH)) |
Definition at line 668 of file htup_details.h.
#define HeapTupleClearHeapOnly | ( | tuple | ) | HeapTupleHeaderClearHeapOnly((tuple)->t_data) |
Definition at line 689 of file htup_details.h.
#define HeapTupleClearHotUpdated | ( | tuple | ) | HeapTupleHeaderClearHotUpdated((tuple)->t_data) |
Definition at line 680 of file htup_details.h.
#define HeapTupleHasExternal | ( | tuple | ) | (((tuple)->t_data->t_infomask & HEAP_HASEXTERNAL) != 0) |
Definition at line 671 of file htup_details.h.
#define HeapTupleHasNulls | ( | tuple | ) | (((tuple)->t_data->t_infomask & HEAP_HASNULL) != 0) |
Definition at line 659 of file htup_details.h.
#define HeapTupleHasVarWidth | ( | tuple | ) | (((tuple)->t_data->t_infomask & HEAP_HASVARWIDTH) != 0) |
Definition at line 665 of file htup_details.h.
#define HeapTupleHeaderClearHeapOnly | ( | tup | ) |
Definition at line 509 of file htup_details.h.
#define HeapTupleHeaderClearHotUpdated | ( | tup | ) |
Definition at line 494 of file htup_details.h.
#define HeapTupleHeaderClearMatch | ( | tup | ) |
Definition at line 524 of file htup_details.h.
#define HeapTupleHeaderGetDatumLength | ( | tup | ) | VARSIZE(tup) |
Definition at line 450 of file htup_details.h.
#define HeapTupleHeaderGetNatts | ( | tup | ) | ((tup)->t_infomask2 & HEAP_NATTS_MASK) |
Definition at line 529 of file htup_details.h.
#define HeapTupleHeaderGetRawCommandId | ( | tup | ) |
Definition at line 387 of file htup_details.h.
#define HeapTupleHeaderGetRawXmax | ( | tup | ) |
Definition at line 371 of file htup_details.h.
#define HeapTupleHeaderGetRawXmin | ( | tup | ) |
Definition at line 304 of file htup_details.h.
#define HeapTupleHeaderGetSpeculativeToken | ( | tup | ) |
Definition at line 433 of file htup_details.h.
#define HeapTupleHeaderGetTypeId | ( | tup | ) |
Definition at line 456 of file htup_details.h.
#define HeapTupleHeaderGetTypMod | ( | tup | ) |
Definition at line 466 of file htup_details.h.
#define HeapTupleHeaderGetUpdateXid | ( | tup | ) |
Definition at line 361 of file htup_details.h.
#define HeapTupleHeaderGetXmin | ( | tup | ) |
Definition at line 309 of file htup_details.h.
#define HeapTupleHeaderGetXvac | ( | tup | ) |
Definition at line 411 of file htup_details.h.
#define HeapTupleHeaderHasExternal | ( | tup | ) | (((tup)->t_infomask & HEAP_HASEXTERNAL) != 0) |
Definition at line 537 of file htup_details.h.
#define HeapTupleHeaderHasMatch | ( | tup | ) |
Definition at line 514 of file htup_details.h.
#define HeapTupleHeaderIndicatesMovedPartitions | ( | tup | ) | ItemPointerIndicatesMovedPartitions(&(tup)->t_ctid) |
Definition at line 444 of file htup_details.h.
#define HeapTupleHeaderIsHeapOnly | ( | tup | ) |
Definition at line 499 of file htup_details.h.
#define HeapTupleHeaderIsHotUpdated | ( | tup | ) |
Definition at line 482 of file htup_details.h.
#define HeapTupleHeaderIsSpeculative | ( | tup | ) |
Definition at line 428 of file htup_details.h.
#define HeapTupleHeaderSetCmax | ( | tup, | |
cid, | |||
iscombo | |||
) |
Definition at line 401 of file htup_details.h.
#define HeapTupleHeaderSetCmin | ( | tup, | |
cid | |||
) |
Definition at line 393 of file htup_details.h.
#define HeapTupleHeaderSetDatumLength | ( | tup, | |
len | |||
) | SET_VARSIZE(tup, len) |
Definition at line 453 of file htup_details.h.
#define HeapTupleHeaderSetHeapOnly | ( | tup | ) |
Definition at line 504 of file htup_details.h.
#define HeapTupleHeaderSetHotUpdated | ( | tup | ) |
Definition at line 489 of file htup_details.h.
#define HeapTupleHeaderSetMatch | ( | tup | ) |
Definition at line 519 of file htup_details.h.
#define HeapTupleHeaderSetMovedPartitions | ( | tup | ) | ItemPointerSetMovedPartitions(&(tup)->t_ctid) |
Definition at line 447 of file htup_details.h.
#define HeapTupleHeaderSetNatts | ( | tup, | |
natts | |||
) |
Definition at line 532 of file htup_details.h.
#define HeapTupleHeaderSetSpeculativeToken | ( | tup, | |
token | |||
) |
Definition at line 439 of file htup_details.h.
#define HeapTupleHeaderSetTypeId | ( | tup, | |
typeid | |||
) |
Definition at line 461 of file htup_details.h.
#define HeapTupleHeaderSetTypMod | ( | tup, | |
typmod | |||
) |
Definition at line 471 of file htup_details.h.
#define HeapTupleHeaderSetXmax | ( | tup, | |
xid | |||
) |
Definition at line 376 of file htup_details.h.
#define HeapTupleHeaderSetXmin | ( | tup, | |
xid | |||
) |
Definition at line 315 of file htup_details.h.
#define HeapTupleHeaderSetXminCommitted | ( | tup | ) |
Definition at line 336 of file htup_details.h.
#define HeapTupleHeaderSetXminFrozen | ( | tup | ) |
Definition at line 348 of file htup_details.h.
#define HeapTupleHeaderSetXminInvalid | ( | tup | ) |
Definition at line 342 of file htup_details.h.
#define HeapTupleHeaderSetXvac | ( | tup, | |
xid | |||
) |
Definition at line 419 of file htup_details.h.
#define HeapTupleHeaderXminCommitted | ( | tup | ) |
Definition at line 320 of file htup_details.h.
#define HeapTupleHeaderXminFrozen | ( | tup | ) |
Definition at line 331 of file htup_details.h.
#define HeapTupleHeaderXminInvalid | ( | tup | ) |
Definition at line 325 of file htup_details.h.
#define HeapTupleIsHeapOnly | ( | tuple | ) | HeapTupleHeaderIsHeapOnly((tuple)->t_data) |
Definition at line 683 of file htup_details.h.
#define HeapTupleIsHotUpdated | ( | tuple | ) | HeapTupleHeaderIsHotUpdated((tuple)->t_data) |
Definition at line 674 of file htup_details.h.
#define HeapTupleNoNulls | ( | tuple | ) | (!((tuple)->t_data->t_infomask & HEAP_HASNULL)) |
Definition at line 662 of file htup_details.h.
#define HeapTupleSetHeapOnly | ( | tuple | ) | HeapTupleHeaderSetHeapOnly((tuple)->t_data) |
Definition at line 686 of file htup_details.h.
#define HeapTupleSetHotUpdated | ( | tuple | ) | HeapTupleHeaderSetHotUpdated((tuple)->t_data) |
Definition at line 677 of file htup_details.h.
#define MaxAttrSize (10 * 1024 * 1024) |
Definition at line 583 of file htup_details.h.
#define MaxHeapAttributeNumber 1600 /* 8 * 200 */ |
Definition at line 48 of file htup_details.h.
#define MaxHeapTupleSize (BLCKSZ - MAXALIGN(SizeOfPageHeaderData + sizeof(ItemIdData))) |
Definition at line 558 of file htup_details.h.
#define MaxHeapTuplesPerPage |
Definition at line 572 of file htup_details.h.
#define MaxTupleAttributeNumber 1664 /* 8 * 208 */ |
Definition at line 34 of file htup_details.h.
#define MinHeapTupleSize MAXALIGN(SizeofHeapTupleHeader) |
Definition at line 559 of file htup_details.h.
#define MINIMAL_TUPLE_DATA_OFFSET offsetof(MinimalTupleData, t_infomask2) |
Definition at line 621 of file htup_details.h.
#define MINIMAL_TUPLE_OFFSET ((offsetof(HeapTupleHeaderData, t_infomask2) - sizeof(uint32)) / MAXIMUM_ALIGNOF * MAXIMUM_ALIGNOF) |
Definition at line 617 of file htup_details.h.
#define MINIMAL_TUPLE_PADDING ((offsetof(HeapTupleHeaderData, t_infomask2) - sizeof(uint32)) % MAXIMUM_ALIGNOF) |
Definition at line 619 of file htup_details.h.
#define SizeofHeapTupleHeader offsetof(HeapTupleHeaderData, t_bits) |
Definition at line 185 of file htup_details.h.
#define SizeofMinimalTupleHeader offsetof(MinimalTupleData, t_bits) |
Definition at line 647 of file htup_details.h.
typedef struct DatumTupleFields DatumTupleFields |
typedef struct HeapTupleFields HeapTupleFields |
|
inlinestatic |
Definition at line 749 of file htup_details.h.
References Assert, att_isnull(), attnum, fetchatt, HeapTupleNoNulls, nocachegetattr(), HeapTupleHeaderData::t_bits, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, and TupleDescAttr.
Referenced by AttrDefaultFetch(), CatalogCacheComputeTupleHashValue(), check_toast_tuple(), CheckConstraintFetch(), extractRelOptions(), heap_fetch_toast_slice(), heap_getattr(), load_domaintype_info(), MergeWithExistingConstraint(), pg_get_triggerdef_worker(), RelationBuildTriggers(), RelationGetExclusionInfo(), RelationInitIndexAccessInfo(), ReorderBufferToastAppendChunk(), and ReorderBufferToastReplace().
Definition at line 147 of file heaptuple.c.
References AttrMissing::am_present, AttrMissing::am_value, Assert, attnum, TupleDescData::constr, datumCopy(), HASH_ENTER, hash_search(), init_missing_cache(), sort-test::key, MemoryContextSwitchTo(), TupleConstr::missing, missing_cache, PointerGetDatum(), TopMemoryContext, TupleDescAttr, missing_cache_key::value, and VARSIZE_ANY.
Referenced by heap_getattr().
Definition at line 455 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 TupleDescAttr.
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(), 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 215 of file heaptuple.c.
References att_addlength_datum, att_align_datum, att_align_nominal, ATT_IS_PACKABLE, DatumGetEOHP(), DatumGetPointer(), EOH_get_flat_size(), i, TupleDescData::natts, TupleDescAttr, 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 1535 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 1080 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 776 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(), 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 802 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 1345 of file heaptuple.c.
References att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull(), attnum, fetchatt, for(), HeapTupleHasNulls, HeapTupleHeaderGetNatts, Min, TupleDescData::natts, HeapTupleHeaderData::t_bits, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, TupleDescAttr, 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 1065 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 400 of file heaptuple.c.
References Assert, bit(), data, fill_val(), HEAP_HASEXTERNAL, HEAP_HASNULL, HEAP_HASVARWIDTH, HIGHBIT, i, TupleDescData::natts, PointerGetDatum(), start, TupleDescAttr, 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 1452 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 1116 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 1523 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 1434 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(), ExecReScanSetOp(), 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().
|
inlinestatic |
Definition at line 792 of file htup_details.h.
References attnum, fastgetattr(), getmissingattr(), heap_getsysattr(), HeapTupleHeaderGetNatts, and HeapTupleData::t_data.
Referenced by AlterDatabaseOwner(), AlterDatabaseRefreshColl(), AlterForeignDataWrapperOwner_internal(), AlterForeignServerOwner_internal(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterPolicy(), AlterSetting(), AlterTableSpaceOptions(), AlterTypeOwnerInternal(), ApplySetting(), ATExecAlterColumnType(), BuildEventTriggerCache(), CatalogCacheCreateEntry(), change_owner_fix_column_acls(), CloneRowTriggersToPartition(), comparetup_cluster_tiebreak(), comparetup_heap_tiebreak(), composite_to_json(), composite_to_jsonb(), decompile_conbin(), EventTriggerSQLDropAddObject(), ExecAlterExtensionStmt(), ExecEvalFieldSelect(), ExecGrant_Largeobject(), ExecScanSubPlan(), ExecSetParamPlan(), extension_config_remove(), GenerateTypeDependencies(), get_primary_key_attnos(), get_relation_constraint_attnos(), GetAttributeByName(), GetAttributeByNum(), GetComment(), GetSecurityLabel(), GetSharedSecurityLabel(), GetSysCacheOid(), HeapDetermineColumnsInfo(), HeapKeyTest(), make_build_data(), object_ownercheck(), pg_event_trigger_ddl_commands(), pg_extension_config_dump(), pg_get_acl(), pg_identify_object(), pg_largeobject_aclmask_snapshot(), plperl_hash_from_tuple(), pltcl_build_tuple_argument(), pltcl_set_tuple_values(), PLyDict_FromTuple(), readtup_cluster(), readtup_heap(), recordExtensionInitPrivWorker(), recordExtObjInitPriv(), RelationBuildPartitionDesc(), RelationBuildRowSecurity(), RelationBuildRuleLock(), RelationBuildTupleDesc(), RelationGetDummyIndexExpressions(), RelationGetIndexAttrBitmap(), RelationGetIndexExpressions(), RelationGetIndexPredicate(), removeabbrev_cluster(), removeabbrev_heap(), RemoveRoleFromInitPriv(), RemoveRoleFromObjectPolicy(), RenameRole(), ReplaceRoleInInitPriv(), sepgsql_relation_setattr_extra(), SPI_getbinval(), SPI_getvalue(), std_fetch_func(), SysCacheGetAttr(), tuple_to_stringinfo(), tuplesort_putheaptuple(), and tuplesort_puttupleslot().
Definition at line 723 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 1209 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 1277 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 1554 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().
MinimalTuple minimal_expand_tuple | ( | HeapTuple | sourceTuple, |
TupleDesc | tupleDesc | ||
) |
MinimalTuple minimal_tuple_from_heap_tuple | ( | HeapTuple | htup | ) |
Definition at line 1576 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 519 of file heaptuple.c.
References Assert, att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull(), attlen, attnum, fetchatt, HeapTupleHasNulls, HeapTupleHasVarWidth, HeapTupleNoNulls, i, if(), j, TupleDescData::natts, HeapTupleHeaderData::t_bits, HeapTupleData::t_data, HeapTupleHeaderData::t_hoff, and TupleDescAttr.
Referenced by fastgetattr().
StaticAssertDecl | ( | ) |
size_t varsize_any | ( | void * | p | ) |
Definition at line 1594 of file heaptuple.c.
References VARSIZE_ANY.