|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/tsmapi.h"#include "catalog/pg_type.h"#include "miscadmin.h"#include "optimizer/optimizer.h"#include "utils/sampling.h"
Go to the source code of this file.
Data Structures | |
| struct | SystemRowsSamplerData |
Functions | |
| PG_MODULE_MAGIC_EXT (.name="tsm_system_rows",.version=PG_VERSION) | |
| PG_FUNCTION_INFO_V1 (tsm_system_rows_handler) | |
| static void | system_rows_samplescangetsamplesize (PlannerInfo *root, RelOptInfo *baserel, List *paramexprs, BlockNumber *pages, double *tuples) |
| static void | system_rows_initsamplescan (SampleScanState *node, int eflags) |
| static void | system_rows_beginsamplescan (SampleScanState *node, Datum *params, int nparams, uint32 seed) |
| static BlockNumber | system_rows_nextsampleblock (SampleScanState *node, BlockNumber nblocks) |
| static OffsetNumber | system_rows_nextsampletuple (SampleScanState *node, BlockNumber blockno, OffsetNumber maxoffset) |
| static uint32 | random_relative_prime (uint32 n, pg_prng_state *randstate) |
| Datum | tsm_system_rows_handler (PG_FUNCTION_ARGS) |
| static uint32 | gcd (uint32 a, uint32 b) |
Definition at line 303 of file tsm_system_rows.c.
Referenced by int4lcm(), int8lcm(), and random_relative_prime().
| PG_FUNCTION_INFO_V1 | ( | tsm_system_rows_handler | ) |
| PG_MODULE_MAGIC_EXT | ( | . | name = "tsm_system_rows", |
| . | version = PG_VERSION |
||
| ) |
|
static |
Definition at line 322 of file tsm_system_rows.c.
References CHECK_FOR_INTERRUPTS, gcd(), and sampler_random_fract().
Referenced by system_rows_nextsampleblock().
|
static |
Definition at line 174 of file tsm_system_rows.c.
References DatumGetInt64(), ereport, errcode(), errmsg(), ERROR, fb(), InvalidOffsetNumber, SampleScanState::tsm_state, and SampleScanState::use_pagemode.
Referenced by tsm_system_rows_handler().
|
static |
Definition at line 164 of file tsm_system_rows.c.
References palloc0_object, and SampleScanState::tsm_state.
Referenced by tsm_system_rows_handler().
|
static |
Definition at line 207 of file tsm_system_rows.c.
References SampleScanState::donetuples, fb(), InvalidBlockNumber, random_relative_prime(), sampler_random_fract(), sampler_random_init_state(), and SampleScanState::tsm_state.
Referenced by tsm_system_rows_handler().
|
static |
Definition at line 273 of file tsm_system_rows.c.
References SampleScanState::donetuples, fb(), FirstOffsetNumber, InvalidOffsetNumber, and SampleScanState::tsm_state.
Referenced by tsm_system_rows_handler().
|
static |
Definition at line 105 of file tsm_system_rows.c.
References clamp_row_est(), DatumGetInt64(), estimate_expression_value(), fb(), IsA, linitial, Min, and root.
Referenced by tsm_system_rows_handler().
| Datum tsm_system_rows_handler | ( | PG_FUNCTION_ARGS | ) |
Definition at line 81 of file tsm_system_rows.c.
References fb(), list_make1_oid, makeNode, PG_RETURN_POINTER, system_rows_beginsamplescan(), system_rows_initsamplescan(), system_rows_nextsampleblock(), system_rows_nextsampletuple(), and system_rows_samplescangetsamplesize().