Module htup

Source

Functions§

HeapTupleGetRawCommandId
HeapTupleHeaderGetRawCommandId will give you what’s in the header whether it is useful or not. Most code should use HeapTupleHeaderGetCmin or HeapTupleHeaderGetCmax instead, but note that those Assert that you can get a legitimate result, ie you are in the originating transaction!
HeapTupleHeaderFrozen
Does the specified HeapTupleHeaderData represent a “frozen” tuple?
HeapTupleHeaderGetNatts
How many attributes does the specified HeapTupleHeader have?
HeapTupleHeaderGetRawXmin
HeapTupleHeaderGetRawXmin returns the “raw” xmin field, which is the xid originally used to insert the tuple. However, the tuple might actually be frozen (via HeapTupleHeaderSetXminFrozen) in which case the tuple’s xmin is visible to every snapshot. Prior to PostgreSQL 9.4, we actually changed the xmin to FrozenTransactionId, and that value may still be encountered on disk.
HeapTupleHeaderGetXmin
Returns the xmin value of the specified HeapTupleHeaderData
HeapTupleHeaderIsHeapOnly
Safety
HeapTupleHeaderIsHotUpdated
Safety
HeapTupleHeaderXminInvalid
Safety
HeapTupleNoNulls
Does the specified HeapTuple contain nulls?
heap_getattr
Extract an attribute of a heap tuple and return it as a Datum. This works for either system or user attributes. The given attnum is properly range-checked.