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