pub unsafe fn heap_getattr(
tup: *mut HeapTupleData,
attnum: i32,
tupleDesc: TupleDesc,
isnull: &mut bool,
) -> DatumExpand description
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.
If the field in question has a NULL value, we return a zero Datum
and set *isnull == true. Otherwise, we set *isnull == false.
ยงSafety
tupis the pointer to the heap tuple.attnumis the 1-based attribute number of the column (field) caller wants.tupleDescis a pointer to the structure describing the row and all its fields.
These things must complement each other correctly