[prev] 69 [next]

PostgreSQL Tuples (cont)

Tuple-related data types: (cont)

typedef struct HeapTupleHeaderData // simplified
{
    HeapTupleFields t_heap;
    ItemPointerData t_ctid;      // TID of this tuple or newer version
    uint16          t_infomask2; // number of attributes + flags
    uint16          t_infomask;  // flags e.g. has_null, has_varwidth
    uint8           t_hoff;      // sizeof header incl. bitmap+padding
    // above is fixed size (23 bytes) for all heap tuples
    bits8           t_bits[1];   // bitmap of NULLs, variable length
    // actual data follows at end of struct
} HeapTupleHeaderData;