PostgreSQL Source Code git master
Loading...
Searching...
No Matches
nodeTidscan.h File Reference
#include "nodes/execnodes.h"
Include dependency graph for nodeTidscan.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

TidScanStateExecInitTidScan (TidScan *node, EState *estate, int eflags)
 
void ExecEndTidScan (TidScanState *node)
 
void ExecReScanTidScan (TidScanState *node)
 

Function Documentation

◆ ExecEndTidScan()

void ExecEndTidScan ( TidScanState node)
extern

Definition at line 481 of file nodeTidscan.c.

482{
483 if (node->ss.ss_currentScanDesc)
485}
struct TableScanDescData * ss_currentScanDesc
Definition execnodes.h:1625
ScanState ss
Definition execnodes.h:1893
static void table_endscan(TableScanDesc scan)
Definition tableam.h:1005

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

Referenced by ExecEndNode().

◆ ExecInitTidScan()

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

Definition at line 499 of file nodeTidscan.c.

500{
503
504 /*
505 * create state structure
506 */
508 tidstate->ss.ps.plan = (Plan *) node;
509 tidstate->ss.ps.state = estate;
510 tidstate->ss.ps.ExecProcNode = ExecTidScan;
511
512 /*
513 * Miscellaneous initialization
514 *
515 * create expression context for node
516 */
517 ExecAssignExprContext(estate, &tidstate->ss.ps);
518
519 /*
520 * mark tid list as not computed yet
521 */
522 tidstate->tss_TidList = NULL;
523 tidstate->tss_NumTids = 0;
524 tidstate->tss_TidPtr = -1;
525
526 /*
527 * open the scan relation
528 */
529 currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags);
530
531 tidstate->ss.ss_currentRelation = currentRelation;
532 tidstate->ss.ss_currentScanDesc = NULL; /* no heap scan here */
533
534 /*
535 * get the scan type from the relation descriptor.
536 */
537 ExecInitScanTupleSlot(estate, &tidstate->ss,
540
541 /*
542 * Initialize result type and projection.
543 */
546
547 /*
548 * initialize child expressions
549 */
550 tidstate->ss.ps.qual =
551 ExecInitQual(node->scan.plan.qual, (PlanState *) tidstate);
552
554
555 /*
556 * all done.
557 */
558 return tidstate;
559}
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition execExpr.c:229
void ExecAssignScanProjectionInfo(ScanState *node)
Definition execScan.c:81
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
void ExecInitResultTypeTL(PlanState *planstate)
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition execUtils.c:485
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
Definition execUtils.c:742
static TupleTableSlot * ExecTidScan(PlanState *pstate)
static void TidExprListCreate(TidScanState *tidstate)
Definition nodeTidscan.c:70
#define makeNode(_type_)
Definition nodes.h:161
static int fb(int x)
#define RelationGetDescr(relation)
Definition rel.h:540
Index scanrelid
Definition plannodes.h:523
Scan scan
Definition plannodes.h:706
const TupleTableSlotOps * table_slot_callbacks(Relation relation)
Definition tableam.c:59

References ExecAssignExprContext(), ExecAssignScanProjectionInfo(), ExecInitQual(), ExecInitResultTypeTL(), ExecInitScanTupleSlot(), ExecOpenScanRelation(), ExecTidScan(), fb(), makeNode, RelationGetDescr, TidScan::scan, Scan::scanrelid, table_slot_callbacks(), and TidExprListCreate().

Referenced by ExecInitNode().

◆ ExecReScanTidScan()

void ExecReScanTidScan ( TidScanState node)
extern

Definition at line 458 of file nodeTidscan.c.

459{
460 if (node->tss_TidList)
461 pfree(node->tss_TidList);
462 node->tss_TidList = NULL;
463 node->tss_NumTids = 0;
464 node->tss_TidPtr = -1;
465
466 /* not really necessary, but seems good form */
467 if (node->ss.ss_currentScanDesc)
469
470 ExecScanReScan(&node->ss);
471}
void ExecScanReScan(ScanState *node)
Definition execScan.c:108
void pfree(void *pointer)
Definition mcxt.c:1616
ItemPointerData * tss_TidList
Definition execnodes.h:1898
static void table_rescan(TableScanDesc scan, ScanKeyData *key)
Definition tableam.h:1014

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

Referenced by ExecReScan().