#include "nodes/execnodes.h"
Go to the source code of this file.
Functions | |
TidScanState * | ExecInitTidScan (TidScan *node, EState *estate, int eflags) |
TupleTableSlot * | ExecTidScan (TidScanState *node) |
void | ExecEndTidScan (TidScanState *node) |
void | ExecTidMarkPos (TidScanState *node) |
void | ExecTidRestrPos (TidScanState *node) |
void | ExecReScanTidScan (TidScanState *node) |
void ExecEndTidScan | ( | TidScanState * | node | ) |
Definition at line 424 of file nodeTidscan.c.
References ExecClearTuple(), ExecCloseScanRelation(), ExecFreeExprContext(), ScanState::ps, PlanState::ps_ResultTupleSlot, TidScanState::ss, ScanState::ss_currentRelation, and ScanState::ss_ScanTupleSlot.
Referenced by ExecEndNode().
{ /* * Free the exprcontext */ ExecFreeExprContext(&node->ss.ps); /* * clear out tuple table slots */ ExecClearTuple(node->ss.ps.ps_ResultTupleSlot); ExecClearTuple(node->ss.ss_ScanTupleSlot); /* * close the heap relation. */ ExecCloseScanRelation(node->ss.ss_currentRelation); }
TidScanState* ExecInitTidScan | ( | TidScan * | node, | |
EState * | estate, | |||
int | eflags | |||
) |
Definition at line 483 of file nodeTidscan.c.
References ExecAssignExprContext(), ExecAssignResultTypeFromTL(), ExecAssignScanProjectionInfo(), ExecAssignScanType(), ExecInitExpr(), ExecInitResultTupleSlot(), ExecInitScanTupleSlot(), ExecOpenScanRelation(), makeNode, Scan::plan, PlanState::plan, ScanState::ps, PlanState::ps_TupFromTlist, Plan::qual, PlanState::qual, RelationGetDescr, TidScan::scan, Scan::scanrelid, TidScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, PlanState::state, Plan::targetlist, PlanState::targetlist, TidScan::tidquals, TidScanState::tss_NumTids, TidScanState::tss_TidList, TidScanState::tss_TidPtr, and TidScanState::tss_tidquals.
Referenced by ExecInitNode().
{ TidScanState *tidstate; Relation currentRelation; /* * create state structure */ tidstate = makeNode(TidScanState); tidstate->ss.ps.plan = (Plan *) node; tidstate->ss.ps.state = estate; /* * Miscellaneous initialization * * create expression context for node */ ExecAssignExprContext(estate, &tidstate->ss.ps); tidstate->ss.ps.ps_TupFromTlist = false; /* * initialize child expressions */ tidstate->ss.ps.targetlist = (List *) ExecInitExpr((Expr *) node->scan.plan.targetlist, (PlanState *) tidstate); tidstate->ss.ps.qual = (List *) ExecInitExpr((Expr *) node->scan.plan.qual, (PlanState *) tidstate); tidstate->tss_tidquals = (List *) ExecInitExpr((Expr *) node->tidquals, (PlanState *) tidstate); /* * tuple table initialization */ ExecInitResultTupleSlot(estate, &tidstate->ss.ps); ExecInitScanTupleSlot(estate, &tidstate->ss); /* * mark tid list as not computed yet */ tidstate->tss_TidList = NULL; tidstate->tss_NumTids = 0; tidstate->tss_TidPtr = -1; /* * open the base relation and acquire appropriate lock on it. */ currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags); tidstate->ss.ss_currentRelation = currentRelation; tidstate->ss.ss_currentScanDesc = NULL; /* no heap scan here */ /* * get the scan type from the relation descriptor. */ ExecAssignScanType(&tidstate->ss, RelationGetDescr(currentRelation)); /* * Initialize result tuple type and projection info. */ ExecAssignResultTypeFromTL(&tidstate->ss.ps); ExecAssignScanProjectionInfo(&tidstate->ss); /* * all done. */ return tidstate; }
void ExecReScanTidScan | ( | TidScanState * | node | ) |
Definition at line 405 of file nodeTidscan.c.
References ExecScanReScan(), pfree(), TidScanState::ss, TidScanState::tss_NumTids, TidScanState::tss_TidList, and TidScanState::tss_TidPtr.
Referenced by ExecReScan().
{ if (node->tss_TidList) pfree(node->tss_TidList); node->tss_TidList = NULL; node->tss_NumTids = 0; node->tss_TidPtr = -1; ExecScanReScan(&node->ss); }
void ExecTidMarkPos | ( | TidScanState * | node | ) |
Definition at line 451 of file nodeTidscan.c.
References TidScanState::tss_MarkTidPtr, and TidScanState::tss_TidPtr.
Referenced by ExecMarkPos().
{ node->tss_MarkTidPtr = node->tss_TidPtr; }
void ExecTidRestrPos | ( | TidScanState * | node | ) |
Definition at line 466 of file nodeTidscan.c.
References TidScanState::tss_MarkTidPtr, and TidScanState::tss_TidPtr.
Referenced by ExecRestrPos().
{ node->tss_TidPtr = node->tss_MarkTidPtr; }
TupleTableSlot* ExecTidScan | ( | TidScanState * | node | ) |
Definition at line 393 of file nodeTidscan.c.
References ExecScan(), TidScanState::ss, TidNext(), and TidRecheck().
Referenced by ExecProcNode().
{ return ExecScan(&node->ss, (ExecScanAccessMtd) TidNext, (ExecScanRecheckMtd) TidRecheck); }