33#include "utils/fmgrprotos.h"
70 tsm->repeatable_across_queries =
true;
71 tsm->repeatable_across_scans =
true;
148 errmsg(
"sample percentage must be between 0 and 100")));
static void bernoulli_samplescangetsamplesize(PlannerInfo *root, RelOptInfo *baserel, List *paramexprs, BlockNumber *pages, double *tuples)
static void bernoulli_initsamplescan(SampleScanState *node, int eflags)
Datum tsm_bernoulli_handler(PG_FUNCTION_ARGS)
static void bernoulli_beginsamplescan(SampleScanState *node, Datum *params, int nparams, uint32 seed)
static OffsetNumber bernoulli_nextsampletuple(SampleScanState *node, BlockNumber blockno, OffsetNumber maxoffset)
Node * estimate_expression_value(PlannerInfo *root, Node *node)
double clamp_row_est(double nrows)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_RETURN_POINTER(x)
static Datum hash_any(const unsigned char *k, int keylen)
void * palloc0(Size size)
#define IsA(nodeptr, _type_)
#define InvalidOffsetNumber
#define FirstOffsetNumber
#define list_make1_oid(x1)
static uint32 DatumGetUInt32(Datum X)
static float4 DatumGetFloat4(Datum X)
static unsigned hash(unsigned *uv, int n)