PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <math.h>
#include "access/tsmapi.h"
#include "catalog/pg_type.h"
#include "common/hashfn.h"
#include "optimizer/optimizer.h"
#include "utils/fmgrprotos.h"
Go to the source code of this file.
Data Structures | |
struct | SystemSamplerData |
Functions | |
static void | system_samplescangetsamplesize (PlannerInfo *root, RelOptInfo *baserel, List *paramexprs, BlockNumber *pages, double *tuples) |
static void | system_initsamplescan (SampleScanState *node, int eflags) |
static void | system_beginsamplescan (SampleScanState *node, Datum *params, int nparams, uint32 seed) |
static BlockNumber | system_nextsampleblock (SampleScanState *node, BlockNumber nblocks) |
static OffsetNumber | system_nextsampletuple (SampleScanState *node, BlockNumber blockno, OffsetNumber maxoffset) |
Datum | tsm_system_handler (PG_FUNCTION_ARGS) |
|
static |
Definition at line 139 of file system.c.
References SystemSamplerData::cutoff, DatumGetFloat4(), ereport, errcode(), errmsg(), ERROR, InvalidOffsetNumber, SystemSamplerData::lt, SystemSamplerData::nextblock, PG_UINT32_MAX, SystemSamplerData::seed, SampleScanState::tsm_state, SampleScanState::use_bulkread, and SampleScanState::use_pagemode.
Referenced by tsm_system_handler().
|
static |
Definition at line 130 of file system.c.
References palloc0(), and SampleScanState::tsm_state.
Referenced by tsm_system_handler().
|
static |
Definition at line 178 of file system.c.
References DatumGetUInt32(), for(), hash(), hash_any(), InvalidBlockNumber, SystemSamplerData::nextblock, SystemSamplerData::seed, and SampleScanState::tsm_state.
Referenced by tsm_system_handler().
|
static |
Definition at line 236 of file system.c.
References FirstOffsetNumber, if(), InvalidOffsetNumber, SystemSamplerData::lt, and SampleScanState::tsm_state.
Referenced by tsm_system_handler().
|
static |
Definition at line 88 of file system.c.
References clamp_row_est(), DatumGetFloat4(), estimate_expression_value(), IsA, linitial, RelOptInfo::pages, root, and RelOptInfo::tuples.
Referenced by tsm_system_handler().
Datum tsm_system_handler | ( | PG_FUNCTION_ARGS | ) |
Definition at line 67 of file system.c.
References TsmRoutine::BeginSampleScan, TsmRoutine::EndSampleScan, TsmRoutine::InitSampleScan, list_make1_oid, makeNode, TsmRoutine::NextSampleBlock, TsmRoutine::NextSampleTuple, TsmRoutine::parameterTypes, PG_RETURN_POINTER, TsmRoutine::repeatable_across_queries, TsmRoutine::repeatable_across_scans, TsmRoutine::SampleScanGetSampleSize, system_beginsamplescan(), system_initsamplescan(), system_nextsampleblock(), system_nextsampletuple(), and system_samplescangetsamplesize().