PostgreSQL Source Code git master
Loading...
Searching...
No Matches
tuptable.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * tuptable.h
4 * tuple table support stuff
5 *
6 *
7 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
9 *
10 * src/include/executor/tuptable.h
11 *
12 *-------------------------------------------------------------------------
13 */
14#ifndef TUPTABLE_H
15#define TUPTABLE_H
16
17#include "access/htup.h"
18#include "access/sysattr.h"
19#include "access/tupdesc.h"
20#include "storage/buf.h"
21
22/*----------
23 * The executor stores tuples in a "tuple table" which is a List of
24 * independent TupleTableSlots.
25 *
26 * There's various different types of tuple table slots, each being able to
27 * store different types of tuples. Additional types of slots can be added
28 * without modifying core code. The type of a slot is determined by the
29 * TupleTableSlotOps* passed to the slot creation routine. The builtin types
30 * of slots are
31 *
32 * 1. physical tuple in a disk buffer page (TTSOpsBufferHeapTuple)
33 * 2. physical tuple constructed in palloc'ed memory (TTSOpsHeapTuple)
34 * 3. "minimal" physical tuple constructed in palloc'ed memory
35 * (TTSOpsMinimalTuple)
36 * 4. "virtual" tuple consisting of Datum/isnull arrays (TTSOpsVirtual)
37 *
38 *
39 * The first two cases are similar in that they both deal with "materialized"
40 * tuples, but resource management is different. For a tuple in a disk page
41 * we need to hold a pin on the buffer until the TupleTableSlot's reference
42 * to the tuple is dropped; while for a palloc'd tuple we usually want the
43 * tuple pfree'd when the TupleTableSlot's reference is dropped.
44 *
45 * A "minimal" tuple is handled similarly to a palloc'd regular tuple.
46 * At present, minimal tuples never are stored in buffers, so there is no
47 * parallel to case 1. Note that a minimal tuple has no "system columns".
48 *
49 * A "virtual" tuple is an optimization used to minimize physical data copying
50 * in a nest of plan nodes. Until materialized pass-by-reference Datums in
51 * the slot point to storage that is not directly associated with the
52 * TupleTableSlot; generally they will point to part of a tuple stored in a
53 * lower plan node's output TupleTableSlot, or to a function result
54 * constructed in a plan node's per-tuple econtext. It is the responsibility
55 * of the generating plan node to be sure these resources are not released for
56 * as long as the virtual tuple needs to be valid or is materialized. Note
57 * also that a virtual tuple does not have any "system columns".
58 *
59 * The Datum/isnull arrays of a TupleTableSlot serve double duty. For virtual
60 * slots they are the authoritative data. For the other builtin slots,
61 * the arrays contain data extracted from the tuple. (In this state, any
62 * pass-by-reference Datums point into the physical tuple.) The extracted
63 * information is built "lazily", ie, only as needed. This serves to avoid
64 * repeated extraction of data from the physical tuple.
65 *
66 * A TupleTableSlot can also be "empty", indicated by flag TTS_FLAG_EMPTY set
67 * in tts_flags, holding no valid data. This is the only valid state for a
68 * freshly-created slot that has not yet had a tuple descriptor assigned to
69 * it. In this state, TTS_FLAG_SHOULDFREE should not be set in tts_flags and
70 * tts_nvalid should be set to zero.
71 *
72 * The tupleDescriptor is simply referenced, not copied, by the TupleTableSlot
73 * code. The caller of ExecSetSlotDescriptor() is responsible for providing
74 * a descriptor that will live as long as the slot does. (Typically, both
75 * slots and descriptors are in per-query memory and are freed by memory
76 * context deallocation at query end; so it's not worth providing any extra
77 * mechanism to do more. However, the slot will increment the tupdesc
78 * reference count if a reference-counted tupdesc is supplied.)
79 *
80 * When TTS_FLAG_SHOULDFREE is set in tts_flags, the physical tuple is "owned"
81 * by the slot and should be freed when the slot's reference to the tuple is
82 * dropped.
83 *
84 * tts_values/tts_isnull are allocated either when the slot is created (when
85 * the descriptor is provided), or when a descriptor is assigned to the slot;
86 * they are of length equal to the descriptor's natts.
87 *----------
88 */
89
90/* true = slot is empty */
91#define TTS_FLAG_EMPTY (1 << 1)
92#define TTS_EMPTY(slot) (((slot)->tts_flags & TTS_FLAG_EMPTY) != 0)
93
94/* should pfree tuple "owned" by the slot? */
95#define TTS_FLAG_SHOULDFREE (1 << 2)
96#define TTS_SHOULDFREE(slot) (((slot)->tts_flags & TTS_FLAG_SHOULDFREE) != 0)
97
98/*
99 * true = slot's formed tuple guaranteed to not have NULLs in NOT NULLable
100 * columns.
101 */
102#define TTS_FLAG_OBEYS_NOT_NULL_CONSTRAINTS (1 << 3)
103#define TTS_OBEYS_NOT_NULL_CONSTRAINTS(slot) \
104 (((slot)->tts_flags & TTS_FLAG_OBEYS_NOT_NULL_CONSTRAINTS) != 0)
105
106/* fixed tuple descriptor */
107#define TTS_FLAG_FIXED (1 << 4)
108#define TTS_FIXED(slot) (((slot)->tts_flags & TTS_FLAG_FIXED) != 0)
109
110/*
111 * Defines which of the above flags should never be set in tts_flags when the
112 * TupleTableSlot is created.
113 */
114#define TTS_FLAGS_TRANSIENT (TTS_FLAG_EMPTY|TTS_FLAG_SHOULDFREE)
115
116struct TupleTableSlotOps;
118
119/* base tuple table slot type */
120typedef struct TupleTableSlot
121{
123#define FIELDNO_TUPLETABLESLOT_FLAGS 1
124 uint16 tts_flags; /* Boolean states */
125#define FIELDNO_TUPLETABLESLOT_NVALID 2
126 AttrNumber tts_nvalid; /* # of valid values in tts_values */
127 const TupleTableSlotOps *const tts_ops; /* implementation of slot */
128#define FIELDNO_TUPLETABLESLOT_TUPLEDESCRIPTOR 4
129 TupleDesc tts_tupleDescriptor; /* slot's tuple descriptor */
130#define FIELDNO_TUPLETABLESLOT_VALUES 5
131 Datum *tts_values; /* current per-attribute values */
132#define FIELDNO_TUPLETABLESLOT_ISNULL 6
133 bool *tts_isnull; /* current per-attribute isnull flags. Array
134 * size must always be rounded up to the next
135 * multiple of 8 elements. */
136 int tts_first_nonguaranteed; /* The value from the TupleDesc's
137 * firstNonGuaranteedAttr, or 0
138 * when tts_flags does not contain
139 * TTS_FLAG_OBEYS_NOT_NULL_CONSTRAINTS */
140
141 MemoryContext tts_mcxt; /* slot itself is in this context */
142 ItemPointerData tts_tid; /* stored tuple's tid */
143 Oid tts_tableOid; /* table oid of tuple */
145
146/* routines for a TupleTableSlot implementation */
148{
149 /* Minimum size of the slot */
151
152 /* Initialization. */
154
155 /* Destruction. */
157
158 /*
159 * Clear the contents of the slot. Only the contents are expected to be
160 * cleared and not the tuple descriptor. Typically an implementation of
161 * this callback should free the memory allocated for the tuple contained
162 * in the slot.
163 */
165
166 /*
167 * Fill up first natts entries of tts_values and tts_isnull arrays with
168 * values from the tuple contained in the slot and set the slot's
169 * tts_nvalid to natts. The function may be called with an natts value
170 * more than the number of attributes available in the tuple, in which
171 * case the function must call slot_getmissingattrs() to populate the
172 * remaining attributes. The function must raise an ERROR if 'natts' is
173 * higher than the number of attributes in the slot's TupleDesc.
174 */
175 void (*getsomeattrs) (TupleTableSlot *slot, int natts);
176
177 /*
178 * Returns value of the given system attribute as a datum and sets isnull
179 * to false, if it's not NULL. Throws an error if the slot type does not
180 * support system attributes.
181 */
182 Datum (*getsysattr) (TupleTableSlot *slot, int attnum, bool *isnull);
183
184 /*
185 * Check if the tuple is created by the current transaction. Throws an
186 * error if the slot doesn't contain the storage tuple.
187 */
189
190 /*
191 * Make the contents of the slot solely depend on the slot, and not on
192 * underlying resources (like another memory context, buffers, etc).
193 */
195
196 /*
197 * Copy the contents of the source slot into the destination slot's own
198 * context. Invoked using callback of the destination slot. 'dstslot' and
199 * 'srcslot' can be assumed to have the same number of attributes.
200 */
202
203 /*
204 * Return a heap tuple "owned" by the slot. It is slot's responsibility to
205 * free the memory consumed by the heap tuple. If the slot can not "own" a
206 * heap tuple, it should not implement this callback and should set it as
207 * NULL.
208 */
210
211 /*
212 * Return a minimal tuple "owned" by the slot. It is slot's responsibility
213 * to free the memory consumed by the minimal tuple. If the slot can not
214 * "own" a minimal tuple, it should not implement this callback and should
215 * set it as NULL.
216 */
218
219 /*
220 * Return a copy of heap tuple representing the contents of the slot. The
221 * copy needs to be palloc'd in the current memory context. The slot
222 * itself is expected to remain unaffected. It is *not* expected to have
223 * meaningful "system columns" in the copy. The copy is not be "owned" by
224 * the slot i.e. the caller has to take responsibility to free memory
225 * consumed by the slot.
226 */
228
229 /*
230 * Return a copy of minimal tuple representing the contents of the slot.
231 * The copy needs to be palloc'd in the current memory context. The slot
232 * itself is expected to remain unaffected. It is *not* expected to have
233 * meaningful "system columns" in the copy. The copy is not be "owned" by
234 * the slot i.e. the caller has to take responsibility to free memory
235 * consumed by the slot.
236 *
237 * The copy has "extra" bytes (maxaligned and zeroed) available before the
238 * tuple, which is useful so that some callers may store extra data along
239 * with the minimal tuple without the need for an additional allocation.
240 */
242};
243
244/*
245 * Predefined TupleTableSlotOps for various types of TupleTableSlotOps. The
246 * same are used to identify the type of a given slot.
247 */
252
253#define TTS_IS_VIRTUAL(slot) ((slot)->tts_ops == &TTSOpsVirtual)
254#define TTS_IS_HEAPTUPLE(slot) ((slot)->tts_ops == &TTSOpsHeapTuple)
255#define TTS_IS_MINIMALTUPLE(slot) ((slot)->tts_ops == &TTSOpsMinimalTuple)
256#define TTS_IS_BUFFERTUPLE(slot) ((slot)->tts_ops == &TTSOpsBufferHeapTuple)
257
258
259/*
260 * Tuple table slot implementations.
261 */
262
264{
266
267 TupleTableSlot base;
268
269 char *data; /* data for materialized slots */
271
272typedef struct HeapTupleTableSlot
273{
275
276 TupleTableSlot base;
277
278#define FIELDNO_HEAPTUPLETABLESLOT_TUPLE 1
279 HeapTuple tuple; /* physical tuple */
280#define FIELDNO_HEAPTUPLETABLESLOT_OFF 2
281 uint32 off; /* saved state for slot_deform_heap_tuple */
282 HeapTupleData tupdata; /* optional workspace for storing tuple */
284
285/* heap tuple residing in a buffer */
287{
289
291
292 /*
293 * If buffer is not InvalidBuffer, then the slot is holding a pin on the
294 * indicated buffer page; drop the pin when we release the slot's
295 * reference to that buffer. (TTS_FLAG_SHOULDFREE should not be set in
296 * such a case, since presumably base.tuple is pointing into the buffer.)
297 */
298 Buffer buffer; /* tuple's buffer, or InvalidBuffer */
300
302{
304
305 TupleTableSlot base;
306
307 /*
308 * In a minimal slot tuple points at minhdr and the fields of that struct
309 * are set correctly for access to the minimal tuple; in particular,
310 * minhdr.t_data points MINIMAL_TUPLE_OFFSET bytes before mintuple. This
311 * allows column extraction to treat the case identically to regular
312 * physical tuples.
313 */
314#define FIELDNO_MINIMALTUPLETABLESLOT_TUPLE 1
315 HeapTuple tuple; /* tuple wrapper */
316 MinimalTuple mintuple; /* minimal tuple, or NULL if none */
317 HeapTupleData minhdr; /* workspace for minimal-tuple-only case */
318#define FIELDNO_MINIMALTUPLETABLESLOT_OFF 4
319 uint32 off; /* saved state for slot_deform_heap_tuple */
321
322/*
323 * TupIsNull -- is a TupleTableSlot empty?
324 */
325#define TupIsNull(slot) \
326 ((slot) == NULL || TTS_EMPTY(slot))
327
328/* in executor/execTuples.c */
330 const TupleTableSlotOps *tts_ops,
331 uint16 flags);
333 const TupleTableSlotOps *tts_ops,
334 uint16 flags);
337 const TupleTableSlotOps *tts_ops);
339extern void ExecSetSlotDescriptor(TupleTableSlot *slot, TupleDesc tupdesc);
341 TupleTableSlot *slot,
342 bool shouldFree);
343extern void ExecForceStoreHeapTuple(HeapTuple tuple,
344 TupleTableSlot *slot,
345 bool shouldFree);
347 TupleTableSlot *slot,
348 Buffer buffer);
350 TupleTableSlot *slot,
351 Buffer buffer);
353 TupleTableSlot *slot,
354 bool shouldFree);
356 bool shouldFree);
360extern HeapTuple ExecFetchSlotHeapTuple(TupleTableSlot *slot, bool materialize, bool *shouldFree);
362 bool *shouldFree);
364extern void slot_getmissingattrs(TupleTableSlot *slot, int startAttNum,
365 int lastAttNum);
366extern void slot_getsomeattrs_int(TupleTableSlot *slot, int attnum);
367
368
369#ifndef FRONTEND
370
371/*
372 * This function forces the entries of the slot's Datum/isnull arrays to be
373 * valid at least up through the attnum'th entry.
374 */
375static inline void
377{
378 /* Populate slot with attributes up to 'attnum', if it's not already */
379 if (slot->tts_nvalid < attnum)
380 slot->tts_ops->getsomeattrs(slot, attnum);
381}
382
383/*
384 * slot_getallattrs
385 * This function forces all the entries of the slot's Datum/isnull
386 * arrays to be valid. The caller may then extract data directly
387 * from those arrays instead of using slot_getattr.
388 */
389static inline void
394
395
396/*
397 * slot_attisnull
398 *
399 * Detect whether an attribute of the slot is null, without actually fetching
400 * it.
401 */
402static inline bool
404{
405 Assert(attnum > 0);
406
407 if (attnum > slot->tts_nvalid)
409
410 return slot->tts_isnull[attnum - 1];
411}
412
413/*
414 * slot_getattr - fetch one attribute of the slot's contents.
415 */
416static inline Datum
418 bool *isnull)
419{
420 Assert(attnum > 0);
421
422 if (attnum > slot->tts_nvalid)
424
425 *isnull = slot->tts_isnull[attnum - 1];
426
427 return slot->tts_values[attnum - 1];
428}
429
430/*
431 * slot_getsysattr - fetch a system attribute of the slot's current tuple.
432 *
433 * If the slot type does not contain system attributes, this will throw an
434 * error. Hence before calling this function, callers should make sure that
435 * the slot type is the one that supports system attributes.
436 */
437static inline Datum
438slot_getsysattr(TupleTableSlot *slot, int attnum, bool *isnull)
439{
440 Assert(attnum < 0); /* caller error */
441
443 {
444 *isnull = false;
445 return ObjectIdGetDatum(slot->tts_tableOid);
446 }
448 {
449 *isnull = false;
450 return PointerGetDatum(&slot->tts_tid);
451 }
452
453 /* Fetch the system attribute from the underlying tuple. */
454 return slot->tts_ops->getsysattr(slot, attnum, isnull);
455}
456
457/*
458 * slot_is_current_xact_tuple - check if the slot's current tuple is created
459 * by the current transaction.
460 *
461 * If the slot does not contain a storage tuple, this will throw an error.
462 * Hence before calling this function, callers should make sure that the
463 * slot type supports storage tuples and that there is currently one inside
464 * the slot.
465 */
466static inline bool
471
472/*
473 * ExecClearTuple - clear the slot's contents
474 */
475static inline TupleTableSlot *
477{
478 slot->tts_ops->clear(slot);
479
480 return slot;
481}
482
483/* ExecMaterializeSlot - force a slot into the "materialized" state.
484 *
485 * This causes the slot's tuple to be a local copy not dependent on any
486 * external storage (i.e. pointing into a Buffer, or having allocations in
487 * another memory context).
488 *
489 * A typical use for this operation is to prepare a computed tuple for being
490 * stored on disk. The original data may or may not be virtual, but in any
491 * case we need a private copy for heap_insert to scribble on.
492 */
493static inline void
495{
496 slot->tts_ops->materialize(slot);
497}
498
499/*
500 * ExecCopySlotHeapTuple - return HeapTuple allocated in caller's context
501 */
502static inline HeapTuple
504{
505 Assert(!TTS_EMPTY(slot));
506
507 return slot->tts_ops->copy_heap_tuple(slot);
508}
509
510/*
511 * ExecCopySlotMinimalTuple - return MinimalTuple allocated in caller's context
512 */
513static inline MinimalTuple
515{
516 return slot->tts_ops->copy_minimal_tuple(slot, 0);
517}
518
519/*
520 * ExecCopySlotMinimalTupleExtra - return MinimalTuple allocated in caller's
521 * context, with extra bytes (maxaligned and zeroed) before the tuple for data
522 * the caller wishes to store along with the tuple (without requiring the
523 * caller to make an additional allocation).
524 */
525static inline MinimalTuple
527{
528 return slot->tts_ops->copy_minimal_tuple(slot, extra);
529}
530
531/*
532 * ExecCopySlot - copy one slot's contents into another.
533 *
534 * If a source's system attributes are supposed to be accessed in the target
535 * slot, the target slot and source slot types need to match.
536 *
537 * Currently, 'dstslot' and 'srcslot' must have the same number of attributes.
538 * Future work could see this relaxed to allow the source to contain
539 * additional attributes and have the code here only copy over the leading
540 * attributes.
541 */
542static inline TupleTableSlot *
544{
546 Assert(srcslot != dstslot);
547 Assert(dstslot->tts_tupleDescriptor->natts ==
548 srcslot->tts_tupleDescriptor->natts);
549
550 dstslot->tts_ops->copyslot(dstslot, srcslot);
551
552 return dstslot;
553}
554
555#endif /* FRONTEND */
556
557#endif /* TUPTABLE_H */
int16 AttrNumber
Definition attnum.h:21
int Buffer
Definition buf.h:23
#define PGDLLIMPORT
Definition c.h:1423
#define Assert(condition)
Definition c.h:945
uint16_t uint16
Definition c.h:617
uint32_t uint32
Definition c.h:618
size_t Size
Definition c.h:691
HeapTupleData * HeapTuple
Definition htup.h:71
MinimalTupleData * MinimalTuple
Definition htup.h:27
NodeTag
Definition nodes.h:27
int16 attnum
const void * data
static Datum PointerGetDatum(const void *X)
Definition postgres.h:342
static Datum ObjectIdGetDatum(Oid X)
Definition postgres.h:252
uint64_t Datum
Definition postgres.h:70
unsigned int Oid
static int fb(int x)
pg_node_attr(abstract) HeapTupleTableSlot base
pg_node_attr(abstract) TupleTableSlot base
HeapTupleData tupdata
Definition tuptable.h:282
HeapTuple tuple
Definition tuptable.h:279
Definition pg_list.h:54
HeapTupleData minhdr
Definition tuptable.h:317
pg_node_attr(abstract) TupleTableSlot base
MinimalTuple mintuple
Definition tuptable.h:316
Datum(* getsysattr)(TupleTableSlot *slot, int attnum, bool *isnull)
Definition tuptable.h:182
size_t base_slot_size
Definition tuptable.h:150
bool(* is_current_xact_tuple)(TupleTableSlot *slot)
Definition tuptable.h:188
HeapTuple(* get_heap_tuple)(TupleTableSlot *slot)
Definition tuptable.h:209
MinimalTuple(* copy_minimal_tuple)(TupleTableSlot *slot, Size extra)
Definition tuptable.h:241
void(* init)(TupleTableSlot *slot)
Definition tuptable.h:153
void(* copyslot)(TupleTableSlot *dstslot, TupleTableSlot *srcslot)
Definition tuptable.h:201
void(* getsomeattrs)(TupleTableSlot *slot, int natts)
Definition tuptable.h:175
HeapTuple(* copy_heap_tuple)(TupleTableSlot *slot)
Definition tuptable.h:227
MinimalTuple(* get_minimal_tuple)(TupleTableSlot *slot)
Definition tuptable.h:217
void(* clear)(TupleTableSlot *slot)
Definition tuptable.h:164
void(* materialize)(TupleTableSlot *slot)
Definition tuptable.h:194
void(* release)(TupleTableSlot *slot)
Definition tuptable.h:156
TupleDesc tts_tupleDescriptor
Definition tuptable.h:129
const TupleTableSlotOps *const tts_ops
Definition tuptable.h:127
NodeTag type
Definition tuptable.h:122
MemoryContext tts_mcxt
Definition tuptable.h:141
int tts_first_nonguaranteed
Definition tuptable.h:136
AttrNumber tts_nvalid
Definition tuptable.h:126
bool * tts_isnull
Definition tuptable.h:133
ItemPointerData tts_tid
Definition tuptable.h:142
Datum * tts_values
Definition tuptable.h:131
uint16 tts_flags
Definition tuptable.h:124
pg_node_attr(abstract) TupleTableSlot base
#define TableOidAttributeNumber
Definition sysattr.h:26
#define SelfItemPointerAttributeNumber
Definition sysattr.h:21
PGDLLIMPORT const TupleTableSlotOps TTSOpsMinimalTuple
Definition execTuples.c:86
void ExecResetTupleTable(List *tupleTable, bool shouldFree)
TupleTableSlot * ExecStorePinnedBufferHeapTuple(HeapTuple tuple, TupleTableSlot *slot, Buffer buffer)
TupleTableSlot * MakeSingleTupleTableSlot(TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
static MinimalTuple ExecCopySlotMinimalTuple(TupleTableSlot *slot)
Definition tuptable.h:514
void ExecDropSingleTupleTableSlot(TupleTableSlot *slot)
#define TTS_EMPTY(slot)
Definition tuptable.h:92
static void slot_getsomeattrs(TupleTableSlot *slot, int attnum)
Definition tuptable.h:376
TupleTableSlot * ExecStoreVirtualTuple(TupleTableSlot *slot)
void ExecForceStoreMinimalTuple(MinimalTuple mtup, TupleTableSlot *slot, bool shouldFree)
static HeapTuple ExecCopySlotHeapTuple(TupleTableSlot *slot)
Definition tuptable.h:503
MinimalTuple ExecFetchSlotMinimalTuple(TupleTableSlot *slot, bool *shouldFree)
static Datum slot_getsysattr(TupleTableSlot *slot, int attnum, bool *isnull)
Definition tuptable.h:438
TupleTableSlot * ExecStoreMinimalTuple(MinimalTuple mtup, TupleTableSlot *slot, bool shouldFree)
TupleTableSlot * MakeTupleTableSlot(TupleDesc tupleDesc, const TupleTableSlotOps *tts_ops, uint16 flags)
PGDLLIMPORT const TupleTableSlotOps TTSOpsVirtual
Definition execTuples.c:84
HeapTuple ExecFetchSlotHeapTuple(TupleTableSlot *slot, bool materialize, bool *shouldFree)
void slot_getmissingattrs(TupleTableSlot *slot, int startAttNum, int lastAttNum)
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
Definition tuptable.h:417
TupleTableSlot * ExecStoreBufferHeapTuple(HeapTuple tuple, TupleTableSlot *slot, Buffer buffer)
static bool slot_is_current_xact_tuple(TupleTableSlot *slot)
Definition tuptable.h:467
void ExecStoreHeapTupleDatum(Datum data, TupleTableSlot *slot)
void ExecSetSlotDescriptor(TupleTableSlot *slot, TupleDesc tupdesc)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition tuptable.h:476
static MinimalTuple ExecCopySlotMinimalTupleExtra(TupleTableSlot *slot, Size extra)
Definition tuptable.h:526
PGDLLIMPORT const TupleTableSlotOps TTSOpsHeapTuple
Definition execTuples.c:85
Datum ExecFetchSlotHeapTupleDatum(TupleTableSlot *slot)
static void slot_getallattrs(TupleTableSlot *slot)
Definition tuptable.h:390
void slot_getsomeattrs_int(TupleTableSlot *slot, int attnum)
static TupleTableSlot * ExecCopySlot(TupleTableSlot *dstslot, TupleTableSlot *srcslot)
Definition tuptable.h:543
PGDLLIMPORT const TupleTableSlotOps TTSOpsBufferHeapTuple
Definition execTuples.c:87
TupleTableSlot * ExecAllocTableSlot(List **tupleTable, TupleDesc desc, const TupleTableSlotOps *tts_ops, uint16 flags)
static void ExecMaterializeSlot(TupleTableSlot *slot)
Definition tuptable.h:494
TupleTableSlot * ExecStoreAllNullTuple(TupleTableSlot *slot)
TupleTableSlot * ExecStoreHeapTuple(HeapTuple tuple, TupleTableSlot *slot, bool shouldFree)
static bool slot_attisnull(TupleTableSlot *slot, int attnum)
Definition tuptable.h:403
void ExecForceStoreHeapTuple(HeapTuple tuple, TupleTableSlot *slot, bool shouldFree)