43 #define IsCTIDVar(node) \
46 ((Var *) (node))->varattno == SelfItemPointerAttributeNumber)
97 elog(
ERROR,
"could not identify CTID variable");
113 tidexpr->
cexpr = cexpr;
117 elog(
ERROR,
"could not identify CTID expression");
189 if (numTids >= numAllocTids)
196 tidList[numTids++] = *itemptr;
214 if (numTids + ndatums > numAllocTids)
216 numAllocTids = numTids + ndatums;
221 for (
i = 0;
i < ndatums;
i++)
231 tidList[numTids++] = *itemptr;
245 if (numTids >= numAllocTids)
252 tidList[numTids++] = cursor_tid;
#define DatumGetArrayTypeP(X)
void deconstruct_array_builtin(ArrayType *array, Oid elmtype, Datum **elemsp, bool **nullsp, int *nelemsp)
#define Assert(condition)
bool execCurrentOf(CurrentOfExpr *cexpr, ExprContext *econtext, Oid table_oid, ItemPointer current_tid)
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)
static OffsetNumber ItemPointerGetOffsetNumber(const ItemPointerData *pointer)
static BlockNumber ItemPointerGetBlockNumber(const ItemPointerData *pointer)
ItemPointerData * ItemPointer
List * lappend(List *list, void *datum)
void pfree(void *pointer)
void * palloc0(Size size)
void * repalloc(void *pointer, Size size)
#define CHECK_FOR_INTERRUPTS()
static bool is_opclause(const void *clause)
static Node * get_rightop(const void *clause)
static Node * get_leftop(const void *clause)
static TupleTableSlot * ExecTidScan(PlanState *pstate)
static int itemptr_comparator(const void *a, const void *b)
static bool TidRecheck(TidScanState *node, TupleTableSlot *slot)
void ExecEndTidScan(TidScanState *node)
void ExecReScanTidScan(TidScanState *node)
static void TidListEval(TidScanState *tidstate)
TidScanState * ExecInitTidScan(TidScan *node, EState *estate, int eflags)
static TupleTableSlot * TidNext(TidScanState *node)
static void TidExprListCreate(TidScanState *tidstate)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
static int list_length(const List *l)
#define qsort(a, b, c, d)
static Pointer DatumGetPointer(Datum X)
static size_t qunique(void *array, size_t elements, size_t width, int(*compare)(const void *, const void *))
#define RelationGetRelid(relation)
#define RelationGetDescr(relation)
#define ScanDirectionIsBackward(direction)
ScanDirection es_direction
ExprContext * ps_ExprContext
ExecProcNodeMtd ExecProcNode
Relation ss_currentRelation
TupleTableSlot * ss_ScanTupleSlot
struct TableScanDescData * ss_currentScanDesc
ItemPointerData * tss_TidList
const TupleTableSlotOps * table_slot_callbacks(Relation relation)
void table_tuple_get_latest_tid(TableScanDesc scan, ItemPointer tid)
static void table_endscan(TableScanDesc scan)
static void table_rescan(TableScanDesc scan, struct ScanKeyData *key)
static bool table_tuple_tid_valid(TableScanDesc scan, ItemPointer tid)
static bool table_tuple_fetch_row_version(Relation rel, ItemPointer tid, Snapshot snapshot, TupleTableSlot *slot)
static TableScanDesc table_beginscan_tid(Relation rel, Snapshot snapshot)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)