diff options
author | Jeff Davis | 2025-03-25 05:05:53 +0000 |
---|---|---|
committer | Jeff Davis | 2025-03-25 05:05:53 +0000 |
commit | a0942f441ed651f6345d969b7a8f4774eda1fceb (patch) | |
tree | c40b5889e11c5794963f90096e5f4ba5390059b0 /src/include/access | |
parent | 4d143509cbfae0207c35abffae7b0e3b4d078349 (diff) |
Add ExecCopySlotMinimalTupleExtra().
Allows an "extra" argument that allocates extra memory at the end of
the MinimalTuple. This is important for callers that need to store
additional data, but do not want to perform an additional allocation.
Suggested-by: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/CAApHDvppeqw2pNM-+ahBOJwq2QmC0hOAGsmCpC89QVmEoOvsdg@mail.gmail.com
Diffstat (limited to 'src/include/access')
-rw-r--r-- | src/include/access/htup_details.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h index 6cd4b95bfdb..aa957cf3b01 100644 --- a/src/include/access/htup_details.h +++ b/src/include/access/htup_details.h @@ -839,11 +839,12 @@ extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc, Datum *values, bool *isnull); extern void heap_freetuple(HeapTuple htup); extern MinimalTuple heap_form_minimal_tuple(TupleDesc tupleDescriptor, - const Datum *values, const bool *isnull); + const Datum *values, const bool *isnull, + Size extra); extern void heap_free_minimal_tuple(MinimalTuple mtup); -extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup); +extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup, Size extra); extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup); -extern MinimalTuple minimal_tuple_from_heap_tuple(HeapTuple htup); +extern MinimalTuple minimal_tuple_from_heap_tuple(HeapTuple htup, Size extra); extern size_t varsize_any(void *p); extern HeapTuple heap_expand_tuple(HeapTuple sourceTuple, TupleDesc tupleDesc); extern MinimalTuple minimal_expand_tuple(HeapTuple sourceTuple, TupleDesc tupleDesc); |