Skip to content

Commit 5408e23

Browse files
committed
Allow to use HeapTupleData embedded in [Buffer]HeapTupleTableSlot.
That avoids having to care about the lifetime of the HeapTupleHeaderData passed to ExecStore[Buffer]HeapTuple(). That doesn't make a huge difference for a plain HeapTupleTableSlot, but for BufferHeapTupleTableSlot it can be a significant advantage, avoiding the need to materialize slots where it's inconvenient to provide a HeapTupleData with appropriate lifetime to point to the on-disk tuple. It's quite possible that we'll want to add support functions for constructing HeapTuples using that embedded HeapTupleData, but for now callers do so themselves. Author: Andres Freund Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de
1 parent 8aa02b5 commit 5408e23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/include/executor/tuptable.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "access/htup.h"
1818
#include "access/tupdesc.h"
19+
#include "access/htup_details.h"
1920
#include "storage/buf.h"
2021

2122
/*----------
@@ -246,6 +247,7 @@ typedef struct HeapTupleTableSlot
246247
HeapTuple tuple; /* physical tuple */
247248
#define FIELDNO_HEAPTUPLETABLESLOT_OFF 2
248249
uint32 off; /* saved state for slot_deform_heap_tuple */
250+
HeapTupleData tupdata; /* optional workspace for storing tuple */
249251
} HeapTupleTableSlot;
250252

251253
/* heap tuple residing in a buffer */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy