PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/relscan.h"
#include "access/tableam.h"
#include "access/tsmapi.h"
#include "common/pg_prng.h"
#include "executor/executor.h"
#include "executor/nodeSamplescan.h"
#include "utils/fmgrprotos.h"
#include "utils/rel.h"
Go to the source code of this file.
Functions | |
static TupleTableSlot * | SampleNext (SampleScanState *node) |
static void | tablesample_init (SampleScanState *scanstate) |
static TupleTableSlot * | tablesample_getnext (SampleScanState *scanstate) |
static bool | SampleRecheck (SampleScanState *node, TupleTableSlot *slot) |
static TupleTableSlot * | ExecSampleScan (PlanState *pstate) |
SampleScanState * | ExecInitSampleScan (SampleScan *node, EState *estate, int eflags) |
void | ExecEndSampleScan (SampleScanState *node) |
void | ExecReScanSampleScan (SampleScanState *node) |
void ExecEndSampleScan | ( | SampleScanState * | node | ) |
Definition at line 179 of file nodeSamplescan.c.
References TsmRoutine::EndSampleScan, SampleScanState::ss, ScanState::ss_currentScanDesc, table_endscan(), and SampleScanState::tsmroutine.
Referenced by ExecEndNode().
SampleScanState* ExecInitSampleScan | ( | SampleScan * | node, |
EState * | estate, | ||
int | eflags | ||
) |
Definition at line 93 of file nodeSamplescan.c.
References SampleScanState::args, TableSampleClause::args, Assert, SampleScanState::begun, ExecAssignExprContext(), ExecAssignScanProjectionInfo(), ExecInitExpr(), ExecInitExprList(), ExecInitQual(), ExecInitResultTypeTL(), ExecInitScanTupleSlot(), ExecOpenScanRelation(), PlanState::ExecProcNode, ExecSampleScan(), GetTsmRoutine(), TsmRoutine::InitSampleScan, innerPlan, makeNode, outerPlan, pg_global_prng_state, pg_prng_uint32(), PlanState::plan, ScanState::ps, PlanState::qual, RelationGetDescr, SampleScanState::repeatable, TableSampleClause::repeatable, SampleScan::scan, Scan::scanrelid, SampleScanState::seed, SampleScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, PlanState::state, table_slot_callbacks(), SampleScan::tablesample, SampleScanState::tsm_state, TableSampleClause::tsmhandler, and SampleScanState::tsmroutine.
Referenced by ExecInitNode().
void ExecReScanSampleScan | ( | SampleScanState * | node | ) |
Definition at line 202 of file nodeSamplescan.c.
References SampleScanState::begun, SampleScanState::done, SampleScanState::donetuples, ExecScanReScan(), SampleScanState::haveblock, and SampleScanState::ss.
Referenced by ExecReScan().
|
static |
Definition at line 79 of file nodeSamplescan.c.
References castNode, ExecScan(), SampleNext(), SampleRecheck(), and SampleScanState::ss.
Referenced by ExecInitSampleScan().
|
static |
Definition at line 42 of file nodeSamplescan.c.
References SampleScanState::begun, tablesample_getnext(), and tablesample_init().
Referenced by ExecSampleScan().
|
static |
|
static |
Definition at line 320 of file nodeSamplescan.c.
References SampleScanState::done, SampleScanState::donetuples, ExecClearTuple(), SampleScanState::haveblock, SampleScanState::ss, ScanState::ss_currentScanDesc, ScanState::ss_ScanTupleSlot, table_scan_sample_next_block(), and table_scan_sample_next_tuple().
Referenced by SampleNext().
|
static |
Definition at line 218 of file nodeSamplescan.c.
References arg, SampleScanState::args, TsmRoutine::BeginSampleScan, SampleScanState::begun, DatumGetUInt32(), DirectFunctionCall1, SampleScanState::donetuples, ereport, errcode(), errmsg(), ERROR, EState::es_snapshot, ExecEvalExprSwitchContext(), hashfloat8(), i, lfirst, list_length(), TsmRoutine::NextSampleBlock, palloc(), pfree(), ScanState::ps, PlanState::ps_ExprContext, SampleScanState::repeatable, SampleScanState::seed, SampleScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, PlanState::state, table_beginscan_sampling(), table_rescan_set_params(), SampleScanState::tsmroutine, SampleScanState::use_bulkread, and SampleScanState::use_pagemode.
Referenced by SampleNext().