[prev] 68 [next]

PostgreSQL Tuples (cont)

Tuple-related data types: (cont)

typedef struct HeapTupleData
{
    uint32           t_len;  // length of *t_data 
    ItemPointerData t_self;  // SelfItemPointer 
    Oid         t_tableOid;  // table the tuple came from 
    HeapTupleHeader t_data;  // tuple header and data 
} HeapTupleData;

PostgreSQL allocates a single block of data for tuple

  • containing the above struct, followed by data byte[]
  • no explicit field for data, it comes after bitmap (see next)