PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "executor/executor.h"
#include "executor/nodeLimit.h"
#include "miscadmin.h"
Go to the source code of this file.
Functions | |
static void | recompute_limits (LimitState *node) |
static int64 | compute_tuples_needed (LimitState *node) |
static TupleTableSlot * | ExecLimit (PlanState *pstate) |
LimitState * | ExecInitLimit (Limit *node, EState *estate, int eflags) |
void | ExecEndLimit (LimitState *node) |
void | ExecReScanLimit (LimitState *node) |
|
static |
Definition at line 431 of file nodeLimit.c.
References LimitState::count, LIMIT_OPTION_WITH_TIES, LimitState::limitOption, LimitState::noCount, and LimitState::offset.
Referenced by recompute_limits().
void ExecEndLimit | ( | LimitState * | node | ) |
Definition at line 534 of file nodeLimit.c.
References ExecEndNode(), and outerPlanState.
Referenced by ExecEndNode().
LimitState* ExecInitLimit | ( | Limit * | node, |
EState * | estate, | ||
int | eflags | ||
) |
Definition at line 447 of file nodeLimit.c.
References Assert, LimitState::eqfunction, EXEC_FLAG_MARK, ExecAssignExprContext(), ExecGetResultSlotOps(), ExecGetResultType(), ExecInitExpr(), ExecInitExtraTupleSlot(), ExecInitNode(), ExecInitResultTypeTL(), ExecLimit(), PlanState::ExecProcNode, execTuplesMatchPrepare(), LimitState::last_slot, LIMIT_INITIAL, LIMIT_OPTION_WITH_TIES, LimitState::limitCount, Limit::limitCount, LimitState::limitOffset, Limit::limitOffset, LimitState::limitOption, Limit::limitOption, LimitState::lstate, makeNode, outerPlan, outerPlanState, PlanState::plan, LimitState::ps, PlanState::ps_ProjInfo, PlanState::resultops, PlanState::resultopsfixed, PlanState::resultopsset, PlanState::state, and Limit::uniqNumCols.
Referenced by ExecInitNode().
|
static |
Definition at line 40 of file nodeLimit.c.
References Assert, castNode, CHECK_FOR_INTERRUPTS, LimitState::count, ExprContext::ecxt_innertuple, ExprContext::ecxt_outertuple, elog, LimitState::eqfunction, ERROR, EState::es_direction, ExecCopySlot(), ExecProcNode(), ExecQualAndReset(), LimitState::last_slot, LIMIT_EMPTY, LIMIT_INITIAL, LIMIT_INWINDOW, LIMIT_OPTION_COUNT, LIMIT_OPTION_WITH_TIES, LIMIT_RESCAN, LIMIT_SUBPLANEOF, LIMIT_WINDOWEND, LIMIT_WINDOWEND_TIES, LIMIT_WINDOWSTART, LimitState::limitOption, LimitState::lstate, LimitState::noCount, LimitState::offset, outerPlan, outerPlanState, LimitState::position, LimitState::ps, PlanState::ps_ExprContext, recompute_limits(), ScanDirectionIsForward, PlanState::state, LimitState::subSlot, and TupIsNull.
Referenced by ExecInitLimit().
void ExecReScanLimit | ( | LimitState * | node | ) |
Definition at line 541 of file nodeLimit.c.
References ExecReScan(), outerPlan, outerPlanState, and recompute_limits().
Referenced by ExecReScan().
|
static |
Definition at line 353 of file nodeLimit.c.
References compute_tuples_needed(), LimitState::count, DatumGetInt64(), ereport, errcode(), errmsg(), ERROR, ExecEvalExprSwitchContext(), ExecSetTupleBound(), LIMIT_RESCAN, LimitState::limitCount, LimitState::limitOffset, LimitState::lstate, LimitState::noCount, LimitState::offset, outerPlanState, LimitState::position, LimitState::ps, PlanState::ps_ExprContext, LimitState::subSlot, and val.
Referenced by ExecLimit(), and ExecReScanLimit().