PostgreSQL Source Code  git master
nodeTidscan.c File Reference
#include "postgres.h"
#include "access/sysattr.h"
#include "access/tableam.h"
#include "catalog/pg_type.h"
#include "executor/executor.h"
#include "executor/nodeTidscan.h"
#include "lib/qunique.h"
#include "miscadmin.h"
#include "nodes/nodeFuncs.h"
#include "utils/array.h"
#include "utils/rel.h"
Include dependency graph for nodeTidscan.c:

Go to the source code of this file.

Data Structures

struct  TidExpr
 

Macros

#define IsCTIDVar(node)
 

Typedefs

typedef struct TidExpr TidExpr
 

Functions

static void TidExprListCreate (TidScanState *tidstate)
 
static void TidListEval (TidScanState *tidstate)
 
static int itemptr_comparator (const void *a, const void *b)
 
static TupleTableSlotTidNext (TidScanState *node)
 
static bool TidRecheck (TidScanState *node, TupleTableSlot *slot)
 
static TupleTableSlotExecTidScan (PlanState *pstate)
 
void ExecReScanTidScan (TidScanState *node)
 
void ExecEndTidScan (TidScanState *node)
 
TidScanStateExecInitTidScan (TidScan *node, EState *estate, int eflags)
 

Macro Definition Documentation

◆ IsCTIDVar

#define IsCTIDVar (   node)
Value:
((node) != NULL && \
IsA((node), Var) && \
((Var *) (node))->varattno == SelfItemPointerAttributeNumber)
#define IsA(nodeptr, _type_)
Definition: nodes.h:158
struct Var Var
Definition: primnodes.h:248
#define SelfItemPointerAttributeNumber
Definition: sysattr.h:21

Definition at line 43 of file nodeTidscan.c.

Typedef Documentation

◆ TidExpr

typedef struct TidExpr TidExpr

Function Documentation

◆ ExecEndTidScan()

void ExecEndTidScan ( TidScanState node)

Definition at line 470 of file nodeTidscan.c.

471 {
472  if (node->ss.ss_currentScanDesc)
474 }
struct TableScanDescData * ss_currentScanDesc
Definition: execnodes.h:1567
ScanState ss
Definition: execnodes.h:1843
static void table_endscan(TableScanDesc scan)
Definition: tableam.h:1029

References TidScanState::ss, ScanState::ss_currentScanDesc, and table_endscan().

Referenced by ExecEndNode().

◆ ExecInitTidScan()

TidScanState* ExecInitTidScan ( TidScan node,
EState estate,
int  eflags 
)

Definition at line 488 of file nodeTidscan.c.

489 {
490  TidScanState *tidstate;
491  Relation currentRelation;
492 
493  /*
494  * create state structure
495  */
496  tidstate = makeNode(TidScanState);
497  tidstate->ss.ps.plan = (Plan *) node;
498  tidstate->ss.ps.state = estate;
499  tidstate->ss.ps.ExecProcNode = ExecTidScan;
500 
501  /*
502  * Miscellaneous initialization
503  *
504  * create expression context for node
505  */
506  ExecAssignExprContext(estate, &tidstate->ss.ps);
507 
508  /*
509  * mark tid list as not computed yet
510  */
511  tidstate->tss_TidList = NULL;
512  tidstate->tss_NumTids = 0;
513  tidstate->tss_TidPtr = -1;
514 
515  /*
516  * open the scan relation
517  */
518  currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags);
519 
520  tidstate->ss.ss_currentRelation = currentRelation;
521  tidstate->ss.ss_currentScanDesc = NULL; /* no heap scan here */
522 
523  /*
524  * get the scan type from the relation descriptor.
525  */
526  ExecInitScanTupleSlot(estate, &tidstate->ss,
527  RelationGetDescr(currentRelation),
528  table_slot_callbacks(currentRelation));
529 
530  /*
531  * Initialize result type and projection.
532  */
533  ExecInitResultTypeTL(&tidstate->ss.ps);
534  ExecAssignScanProjectionInfo(&tidstate->ss);
535 
536  /*
537  * initialize child expressions
538  */
539  tidstate->ss.ps.qual =
540  ExecInitQual(node->scan.plan.qual, (PlanState *) tidstate);
541 
542  TidExprListCreate(tidstate);
543 
544  /*
545  * all done.
546  */
547  return tidstate;
548 }
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition: execExpr.c:220
void ExecAssignScanProjectionInfo(ScanState *node)
Definition: execScan.c:270
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:1898
void ExecInitResultTypeTL(PlanState *planstate)
Definition: execTuples.c:1842
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition: execUtils.c:483
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
Definition: execUtils.c:697
static TupleTableSlot * ExecTidScan(PlanState *pstate)
Definition: nodeTidscan.c:433
static void TidExprListCreate(TidScanState *tidstate)
Definition: nodeTidscan.c:70
#define makeNode(_type_)
Definition: nodes.h:155
#define RelationGetDescr(relation)
Definition: rel.h:531
ExprState * qual
Definition: execnodes.h:1139
Plan * plan
Definition: execnodes.h:1118
EState * state
Definition: execnodes.h:1120
ExecProcNodeMtd ExecProcNode
Definition: execnodes.h:1124
Relation ss_currentRelation
Definition: execnodes.h:1566
PlanState ps
Definition: execnodes.h:1565
Index scanrelid
Definition: plannodes.h:389
ItemPointerData * tss_TidList
Definition: execnodes.h:1848
Scan scan
Definition: plannodes.h:554
const TupleTableSlotOps * table_slot_callbacks(Relation relation)
Definition: tableam.c:58

References ExecAssignExprContext(), ExecAssignScanProjectionInfo(), ExecInitQual(), ExecInitResultTypeTL(), ExecInitScanTupleSlot(), ExecOpenScanRelation(), PlanState::ExecProcNode, ExecTidScan(), makeNode, PlanState::plan, ScanState::ps, PlanState::qual, RelationGetDescr, TidScan::scan, Scan::scanrelid, TidScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, PlanState::state, table_slot_callbacks(), TidExprListCreate(), TidScanState::tss_NumTids, TidScanState::tss_TidList, and TidScanState::tss_TidPtr.

Referenced by ExecInitNode().

◆ ExecReScanTidScan()

void ExecReScanTidScan ( TidScanState node)

Definition at line 447 of file nodeTidscan.c.

448 {
449  if (node->tss_TidList)
450  pfree(node->tss_TidList);
451  node->tss_TidList = NULL;
452  node->tss_NumTids = 0;
453  node->tss_TidPtr = -1;
454 
455  /* not really necessary, but seems good form */
456  if (node->ss.ss_currentScanDesc)
457  table_rescan(node->ss.ss_currentScanDesc, NULL);
458 
459  ExecScanReScan(&node->ss);
460 }
void ExecScanReScan(ScanState *node)
Definition: execScan.c:297
void pfree(void *pointer)
Definition: mcxt.c:1520
static void table_rescan(TableScanDesc scan, struct ScanKeyData *key)
Definition: tableam.h:1038

References ExecScanReScan(), pfree(), TidScanState::ss, ScanState::ss_currentScanDesc, table_rescan(), TidScanState::tss_NumTids, TidScanState::tss_TidList, and TidScanState::tss_TidPtr.

Referenced by ExecReScan().

◆ ExecTidScan()

static TupleTableSlot* ExecTidScan ( PlanState pstate)
static

Definition at line 433 of file nodeTidscan.c.

434 {
435  TidScanState *node = castNode(TidScanState, pstate);
436 
437  return ExecScan(&node->ss,
440 }
TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
Definition: execScan.c:156
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
Definition: executor.h:473
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
Definition: executor.h:474
static bool TidRecheck(TidScanState *node, TupleTableSlot *slot)
Definition: nodeTidscan.c:403
static TupleTableSlot * TidNext(TidScanState *node)
Definition: nodeTidscan.c:312
#define castNode(_type_, nodeptr)
Definition: nodes.h:176

References castNode, ExecScan(), TidScanState::ss, TidNext(), and TidRecheck().

Referenced by ExecInitTidScan().

◆ itemptr_comparator()

static int itemptr_comparator ( const void *  a,
const void *  b 
)
static

Definition at line 283 of file nodeTidscan.c.

284 {
285  const ItemPointerData *ipa = (const ItemPointerData *) a;
286  const ItemPointerData *ipb = (const ItemPointerData *) b;
291 
292  if (ba < bb)
293  return -1;
294  if (ba > bb)
295  return 1;
296  if (oa < ob)
297  return -1;
298  if (oa > ob)
299  return 1;
300  return 0;
301 }
uint32 BlockNumber
Definition: block.h:31
int b
Definition: isn.c:70
int a
Definition: isn.c:69
static OffsetNumber ItemPointerGetOffsetNumber(const ItemPointerData *pointer)
Definition: itemptr.h:124
static BlockNumber ItemPointerGetBlockNumber(const ItemPointerData *pointer)
Definition: itemptr.h:103
uint16 OffsetNumber
Definition: off.h:24

References a, b, ItemPointerGetBlockNumber(), and ItemPointerGetOffsetNumber().

Referenced by TidListEval().

◆ TidExprListCreate()

static void TidExprListCreate ( TidScanState tidstate)
static

Definition at line 70 of file nodeTidscan.c.

71 {
72  TidScan *node = (TidScan *) tidstate->ss.ps.plan;
73  ListCell *l;
74 
75  tidstate->tss_tidexprs = NIL;
76  tidstate->tss_isCurrentOf = false;
77 
78  foreach(l, node->tidquals)
79  {
80  Expr *expr = (Expr *) lfirst(l);
81  TidExpr *tidexpr = (TidExpr *) palloc0(sizeof(TidExpr));
82 
83  if (is_opclause(expr))
84  {
85  Node *arg1;
86  Node *arg2;
87 
88  arg1 = get_leftop(expr);
89  arg2 = get_rightop(expr);
90  if (IsCTIDVar(arg1))
91  tidexpr->exprstate = ExecInitExpr((Expr *) arg2,
92  &tidstate->ss.ps);
93  else if (IsCTIDVar(arg2))
94  tidexpr->exprstate = ExecInitExpr((Expr *) arg1,
95  &tidstate->ss.ps);
96  else
97  elog(ERROR, "could not identify CTID variable");
98  tidexpr->isarray = false;
99  }
100  else if (expr && IsA(expr, ScalarArrayOpExpr))
101  {
102  ScalarArrayOpExpr *saex = (ScalarArrayOpExpr *) expr;
103 
104  Assert(IsCTIDVar(linitial(saex->args)));
105  tidexpr->exprstate = ExecInitExpr(lsecond(saex->args),
106  &tidstate->ss.ps);
107  tidexpr->isarray = true;
108  }
109  else if (expr && IsA(expr, CurrentOfExpr))
110  {
111  CurrentOfExpr *cexpr = (CurrentOfExpr *) expr;
112 
113  tidexpr->cexpr = cexpr;
114  tidstate->tss_isCurrentOf = true;
115  }
116  else
117  elog(ERROR, "could not identify CTID expression");
118 
119  tidstate->tss_tidexprs = lappend(tidstate->tss_tidexprs, tidexpr);
120  }
121 
122  /* CurrentOfExpr could never appear OR'd with something else */
123  Assert(list_length(tidstate->tss_tidexprs) == 1 ||
124  !tidstate->tss_isCurrentOf);
125 }
#define Assert(condition)
Definition: c.h:858
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:224
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
Definition: execExpr.c:134
List * lappend(List *list, void *datum)
Definition: list.c:339
void * palloc0(Size size)
Definition: mcxt.c:1346
static bool is_opclause(const void *clause)
Definition: nodeFuncs.h:74
static Node * get_rightop(const void *clause)
Definition: nodeFuncs.h:93
static Node * get_leftop(const void *clause)
Definition: nodeFuncs.h:81
#define IsCTIDVar(node)
Definition: nodeTidscan.c:43
#define lfirst(lc)
Definition: pg_list.h:172
static int list_length(const List *l)
Definition: pg_list.h:152
#define NIL
Definition: pg_list.h:68
#define linitial(l)
Definition: pg_list.h:178
#define lsecond(l)
Definition: pg_list.h:183
Definition: nodes.h:129
CurrentOfExpr * cexpr
Definition: nodeTidscan.c:53
ExprState * exprstate
Definition: nodeTidscan.c:51
bool isarray
Definition: nodeTidscan.c:52
bool tss_isCurrentOf
Definition: execnodes.h:1845
List * tss_tidexprs
Definition: execnodes.h:1844
List * tidquals
Definition: plannodes.h:555

References ScalarArrayOpExpr::args, Assert, TidExpr::cexpr, elog, ERROR, ExecInitExpr(), TidExpr::exprstate, get_leftop(), get_rightop(), is_opclause(), IsA, TidExpr::isarray, IsCTIDVar, lappend(), lfirst, linitial, list_length(), lsecond, NIL, palloc0(), PlanState::plan, ScanState::ps, TidScanState::ss, TidScan::tidquals, TidScanState::tss_isCurrentOf, and TidScanState::tss_tidexprs.

Referenced by ExecInitTidScan().

◆ TidListEval()

static void TidListEval ( TidScanState tidstate)
static

Definition at line 134 of file nodeTidscan.c.

135 {
136  ExprContext *econtext = tidstate->ss.ps.ps_ExprContext;
137  TableScanDesc scan;
138  ItemPointerData *tidList;
139  int numAllocTids;
140  int numTids;
141  ListCell *l;
142 
143  /*
144  * Start scan on-demand - initializing a scan isn't free (e.g. heap stats
145  * the size of the table), so it makes sense to delay that until needed -
146  * the node might never get executed.
147  */
148  if (tidstate->ss.ss_currentScanDesc == NULL)
149  tidstate->ss.ss_currentScanDesc =
151  tidstate->ss.ps.state->es_snapshot);
152  scan = tidstate->ss.ss_currentScanDesc;
153 
154  /*
155  * We initialize the array with enough slots for the case that all quals
156  * are simple OpExprs or CurrentOfExprs. If there are any
157  * ScalarArrayOpExprs, we may have to enlarge the array.
158  */
159  numAllocTids = list_length(tidstate->tss_tidexprs);
160  tidList = (ItemPointerData *)
161  palloc(numAllocTids * sizeof(ItemPointerData));
162  numTids = 0;
163 
164  foreach(l, tidstate->tss_tidexprs)
165  {
166  TidExpr *tidexpr = (TidExpr *) lfirst(l);
167  ItemPointer itemptr;
168  bool isNull;
169 
170  if (tidexpr->exprstate && !tidexpr->isarray)
171  {
172  itemptr = (ItemPointer)
174  econtext,
175  &isNull));
176  if (isNull)
177  continue;
178 
179  /*
180  * We silently discard any TIDs that the AM considers invalid
181  * (E.g. for heap, they could be out of range at the time of scan
182  * start. Since we hold at least AccessShareLock on the table, it
183  * won't be possible for someone to truncate away the blocks we
184  * intend to visit.).
185  */
186  if (!table_tuple_tid_valid(scan, itemptr))
187  continue;
188 
189  if (numTids >= numAllocTids)
190  {
191  numAllocTids *= 2;
192  tidList = (ItemPointerData *)
193  repalloc(tidList,
194  numAllocTids * sizeof(ItemPointerData));
195  }
196  tidList[numTids++] = *itemptr;
197  }
198  else if (tidexpr->exprstate && tidexpr->isarray)
199  {
200  Datum arraydatum;
201  ArrayType *itemarray;
202  Datum *ipdatums;
203  bool *ipnulls;
204  int ndatums;
205  int i;
206 
207  arraydatum = ExecEvalExprSwitchContext(tidexpr->exprstate,
208  econtext,
209  &isNull);
210  if (isNull)
211  continue;
212  itemarray = DatumGetArrayTypeP(arraydatum);
213  deconstruct_array_builtin(itemarray, TIDOID, &ipdatums, &ipnulls, &ndatums);
214  if (numTids + ndatums > numAllocTids)
215  {
216  numAllocTids = numTids + ndatums;
217  tidList = (ItemPointerData *)
218  repalloc(tidList,
219  numAllocTids * sizeof(ItemPointerData));
220  }
221  for (i = 0; i < ndatums; i++)
222  {
223  if (ipnulls[i])
224  continue;
225 
226  itemptr = (ItemPointer) DatumGetPointer(ipdatums[i]);
227 
228  if (!table_tuple_tid_valid(scan, itemptr))
229  continue;
230 
231  tidList[numTids++] = *itemptr;
232  }
233  pfree(ipdatums);
234  pfree(ipnulls);
235  }
236  else
237  {
238  ItemPointerData cursor_tid;
239 
240  Assert(tidexpr->cexpr);
241  if (execCurrentOf(tidexpr->cexpr, econtext,
243  &cursor_tid))
244  {
245  if (numTids >= numAllocTids)
246  {
247  numAllocTids *= 2;
248  tidList = (ItemPointerData *)
249  repalloc(tidList,
250  numAllocTids * sizeof(ItemPointerData));
251  }
252  tidList[numTids++] = cursor_tid;
253  }
254  }
255  }
256 
257  /*
258  * Sort the array of TIDs into order, and eliminate duplicates.
259  * Eliminating duplicates is necessary since we want OR semantics across
260  * the list. Sorting makes it easier to detect duplicates, and as a bonus
261  * ensures that we will visit the heap in the most efficient way.
262  */
263  if (numTids > 1)
264  {
265  /* CurrentOfExpr could never appear OR'd with something else */
266  Assert(!tidstate->tss_isCurrentOf);
267 
268  qsort(tidList, numTids, sizeof(ItemPointerData),
270  numTids = qunique(tidList, numTids, sizeof(ItemPointerData),
272  }
273 
274  tidstate->tss_TidList = tidList;
275  tidstate->tss_NumTids = numTids;
276  tidstate->tss_TidPtr = -1;
277 }
#define DatumGetArrayTypeP(X)
Definition: array.h:261
void deconstruct_array_builtin(ArrayType *array, Oid elmtype, Datum **elemsp, bool **nullsp, int *nelemsp)
Definition: arrayfuncs.c:3678
bool execCurrentOf(CurrentOfExpr *cexpr, ExprContext *econtext, Oid table_oid, ItemPointer current_tid)
Definition: execCurrent.c:44
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
Definition: executor.h:348
int i
Definition: isn.c:73
ItemPointerData * ItemPointer
Definition: itemptr.h:49
void * repalloc(void *pointer, Size size)
Definition: mcxt.c:1540
void * palloc(Size size)
Definition: mcxt.c:1316
static int itemptr_comparator(const void *a, const void *b)
Definition: nodeTidscan.c:283
#define qsort(a, b, c, d)
Definition: port.h:449
uintptr_t Datum
Definition: postgres.h:64
static Pointer DatumGetPointer(Datum X)
Definition: postgres.h:312
static size_t qunique(void *array, size_t elements, size_t width, int(*compare)(const void *, const void *))
Definition: qunique.h:21
#define RelationGetRelid(relation)
Definition: rel.h:505
Snapshot es_snapshot
Definition: execnodes.h:624
ExprContext * ps_ExprContext
Definition: execnodes.h:1157
static bool table_tuple_tid_valid(TableScanDesc scan, ItemPointer tid)
Definition: tableam.h:1324
static TableScanDesc table_beginscan_tid(Relation rel, Snapshot snapshot)
Definition: tableam.h:1005

References Assert, TidExpr::cexpr, DatumGetArrayTypeP, DatumGetPointer(), deconstruct_array_builtin(), EState::es_snapshot, execCurrentOf(), ExecEvalExprSwitchContext(), TidExpr::exprstate, i, TidExpr::isarray, itemptr_comparator(), lfirst, list_length(), palloc(), pfree(), ScanState::ps, PlanState::ps_ExprContext, qsort, qunique(), RelationGetRelid, repalloc(), TidScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, PlanState::state, table_beginscan_tid(), table_tuple_tid_valid(), TidScanState::tss_isCurrentOf, TidScanState::tss_NumTids, TidScanState::tss_tidexprs, TidScanState::tss_TidList, and TidScanState::tss_TidPtr.

Referenced by TidNext().

◆ TidNext()

static TupleTableSlot * TidNext ( TidScanState node)
static

Definition at line 312 of file nodeTidscan.c.

313 {
314  EState *estate;
315  ScanDirection direction;
316  Snapshot snapshot;
317  TableScanDesc scan;
318  Relation heapRelation;
319  TupleTableSlot *slot;
320  ItemPointerData *tidList;
321  int numTids;
322  bool bBackward;
323 
324  /*
325  * extract necessary information from tid scan node
326  */
327  estate = node->ss.ps.state;
328  direction = estate->es_direction;
329  snapshot = estate->es_snapshot;
330  heapRelation = node->ss.ss_currentRelation;
331  slot = node->ss.ss_ScanTupleSlot;
332 
333  /*
334  * First time through, compute the list of TIDs to be visited
335  */
336  if (node->tss_TidList == NULL)
337  TidListEval(node);
338 
339  scan = node->ss.ss_currentScanDesc;
340  tidList = node->tss_TidList;
341  numTids = node->tss_NumTids;
342 
343  /*
344  * Initialize or advance scan position, depending on direction.
345  */
346  bBackward = ScanDirectionIsBackward(direction);
347  if (bBackward)
348  {
349  if (node->tss_TidPtr < 0)
350  {
351  /* initialize for backward scan */
352  node->tss_TidPtr = numTids - 1;
353  }
354  else
355  node->tss_TidPtr--;
356  }
357  else
358  {
359  if (node->tss_TidPtr < 0)
360  {
361  /* initialize for forward scan */
362  node->tss_TidPtr = 0;
363  }
364  else
365  node->tss_TidPtr++;
366  }
367 
368  while (node->tss_TidPtr >= 0 && node->tss_TidPtr < numTids)
369  {
370  ItemPointerData tid = tidList[node->tss_TidPtr];
371 
372  /*
373  * For WHERE CURRENT OF, the tuple retrieved from the cursor might
374  * since have been updated; if so, we should fetch the version that is
375  * current according to our snapshot.
376  */
377  if (node->tss_isCurrentOf)
378  table_tuple_get_latest_tid(scan, &tid);
379 
380  if (table_tuple_fetch_row_version(heapRelation, &tid, snapshot, slot))
381  return slot;
382 
383  /* Bad TID or failed snapshot qual; try next */
384  if (bBackward)
385  node->tss_TidPtr--;
386  else
387  node->tss_TidPtr++;
388 
390  }
391 
392  /*
393  * if we get here it means the tid scan failed so we are at the end of the
394  * scan..
395  */
396  return ExecClearTuple(slot);
397 }
#define CHECK_FOR_INTERRUPTS()
Definition: miscadmin.h:122
static void TidListEval(TidScanState *tidstate)
Definition: nodeTidscan.c:134
#define ScanDirectionIsBackward(direction)
Definition: sdir.h:50
ScanDirection
Definition: sdir.h:25
ScanDirection es_direction
Definition: execnodes.h:623
TupleTableSlot * ss_ScanTupleSlot
Definition: execnodes.h:1568
void table_tuple_get_latest_tid(TableScanDesc scan, ItemPointer tid)
Definition: tableam.c:235
static bool table_tuple_fetch_row_version(Relation rel, ItemPointer tid, Snapshot snapshot, TupleTableSlot *slot)
Definition: tableam.h:1298
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition: tuptable.h:454

References CHECK_FOR_INTERRUPTS, EState::es_direction, EState::es_snapshot, ExecClearTuple(), ScanState::ps, ScanDirectionIsBackward, TidScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, ScanState::ss_ScanTupleSlot, PlanState::state, table_tuple_fetch_row_version(), table_tuple_get_latest_tid(), TidListEval(), TidScanState::tss_isCurrentOf, TidScanState::tss_NumTids, TidScanState::tss_TidList, and TidScanState::tss_TidPtr.

Referenced by ExecTidScan().

◆ TidRecheck()

static bool TidRecheck ( TidScanState node,
TupleTableSlot slot 
)
static

Definition at line 403 of file nodeTidscan.c.

404 {
405  /*
406  * XXX shouldn't we check here to make sure tuple matches TID list? In
407  * runtime-key case this is not certain, is it? However, in the WHERE
408  * CURRENT OF case it might not match anyway ...
409  */
410  return true;
411 }

Referenced by ExecTidScan().