33 #define IsCTIDVar(node) \
36 ((Var *) (node))->varattno == SelfItemPointerAttributeNumber)
73 elog(
ERROR,
"could not identify CTID variable");
80 case TIDLessEqOperator:
86 case TIDGreaterEqOperator:
89 case TIDGreaterOperator:
93 elog(
ERROR,
"could not identify CTID operator");
118 elog(
ERROR,
"could not identify CTID expression");
121 tidexprs =
lappend(tidexprs, tidopexpr);
241 if (scandesc == NULL)
404 return tidrangestate;
#define InvalidBlockNumber
ExprState * ExecInitQual(List *qual, PlanState *parent)
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
void ExecAssignScanProjectionInfo(ScanState *node)
void ExecScanReScan(ScanState *node)
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
void ExecInitResultTypeTL(PlanState *planstate)
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
void ItemPointerDec(ItemPointer pointer)
void ItemPointerInc(ItemPointer pointer)
int32 ItemPointerCompare(ItemPointer arg1, ItemPointer arg2)
static void ItemPointerSet(ItemPointerData *pointer, BlockNumber blockNumber, OffsetNumber offNum)
ItemPointerData * ItemPointer
static void ItemPointerCopy(const ItemPointerData *fromPointer, ItemPointerData *toPointer)
List * lappend(List *list, void *datum)
static Node * get_rightop(const void *clause)
static Node * get_leftop(const void *clause)
static void TidExprListCreate(TidRangeScanState *tidrangestate)
TidRangeScanState * ExecInitTidRangeScan(TidRangeScan *node, EState *estate, int eflags)
void ExecReScanTidRangeScan(TidRangeScanState *node)
void ExecEndTidRangeScan(TidRangeScanState *node)
static bool TidRangeEval(TidRangeScanState *node)
static TupleTableSlot * ExecTidRangeScan(PlanState *pstate)
static TupleTableSlot * TidRangeNext(TidRangeScanState *node)
static TidOpExpr * MakeTidOpExpr(OpExpr *expr, TidRangeScanState *tidstate)
struct TidOpExpr TidOpExpr
static bool TidRangeRecheck(TidRangeScanState *node, TupleTableSlot *slot)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
static Pointer DatumGetPointer(Datum X)
#define RelationGetDescr(relation)
ScanDirection es_direction
ExprContext * ps_ExprContext
ExecProcNodeMtd ExecProcNode
Relation ss_currentRelation
TupleTableSlot * ss_ScanTupleSlot
struct TableScanDescData * ss_currentScanDesc
ItemPointerData trss_maxtid
ItemPointerData trss_mintid
const TupleTableSlotOps * table_slot_callbacks(Relation relation)
static void table_rescan_tidrange(TableScanDesc sscan, ItemPointer mintid, ItemPointer maxtid)
static void table_endscan(TableScanDesc scan)
static TableScanDesc table_beginscan_tidrange(Relation rel, Snapshot snapshot, ItemPointer mintid, ItemPointer maxtid)
static bool table_scan_getnextslot_tidrange(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)