|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <math.h>#include "access/htup_details.h"#include "catalog/pg_operator.h"#include "catalog/pg_statistic.h"#include "utils/float.h"#include "utils/fmgrprotos.h"#include "utils/lsyscache.h"#include "utils/rangetypes.h"#include "utils/selfuncs.h"#include "utils/typcache.h"
Go to the source code of this file.
|
static |
Definition at line 373 of file rangetypes_selfuncs.c.
References Assert, ATTSTATSSLOT_VALUES, calc_hist_selectivity_contained(), calc_hist_selectivity_contains(), calc_hist_selectivity_scalar(), DatumGetRangeTypeP(), elog, ERROR, fb(), FmgrInfo::fn_oid, free_attstatsslot(), get_attstatsslot(), HeapTupleIsValid, i, InvalidOid, OidIsValid, palloc_array, range_deserialize(), TypeCacheEntry::rng_cmp_proc_finfo, TypeCacheEntry::rng_subdiff_finfo, and statistic_proc_security_check().
Referenced by calc_rangesel().
|
static |
Definition at line 1018 of file rangetypes_selfuncs.c.
References calc_length_hist_frac(), fb(), get_distance(), get_position(), i, lower(), Min, range_cmp_bounds(), rbound_bsearch(), and upper().
Referenced by calc_hist_selectivity().
|
static |
Definition at line 1139 of file rangetypes_selfuncs.c.
References calc_length_hist_frac(), fb(), get_distance(), get_position(), i, lower(), Min, rbound_bsearch(), and upper().
Referenced by calc_hist_selectivity().
|
static |
Definition at line 596 of file rangetypes_selfuncs.c.
References equal(), fb(), get_position(), Max, and rbound_bsearch().
Referenced by calc_hist_selectivity().
|
static |
Definition at line 855 of file rangetypes_selfuncs.c.
References Assert, DatumGetFloat8(), equal(), fb(), get_len_position(), i, and length_hist_bsearch().
Referenced by calc_hist_selectivity_contained(), and calc_hist_selectivity_contains().
|
static |
Definition at line 231 of file rangetypes_selfuncs.c.
References ATTSTATSSLOT_NUMBERS, calc_hist_selectivity(), CLAMP_PROBABILITY, default_range_selectivity(), elog, ERROR, fb(), free_attstatsslot(), get_attstatsslot(), GETSTRUCT(), HeapTupleIsValid, InvalidOid, and RangeIsEmpty.
Referenced by rangesel().
Definition at line 67 of file rangetypes_selfuncs.c.
References DEFAULT_INEQ_SEL, DEFAULT_RANGE_INEQ_SEL, and fb().
Referenced by calc_rangesel(), and rangesel().
|
static |
Definition at line 807 of file rangetypes_selfuncs.c.
References DatumGetFloat8(), fb(), FmgrInfo::fn_oid, FunctionCall2Coll(), get_float8_infinity(), OidIsValid, TypeCacheEntry::rng_collation, and TypeCacheEntry::rng_subdiff_finfo.
Referenced by calc_hist_selectivity_contained(), and calc_hist_selectivity_contains().
Definition at line 762 of file rangetypes_selfuncs.c.
Referenced by calc_length_hist_frac().
|
static |
Definition at line 683 of file rangetypes_selfuncs.c.
References DatumGetFloat8(), fb(), FmgrInfo::fn_oid, FunctionCall2Coll(), Max, Min, OidIsValid, TypeCacheEntry::rng_collation, TypeCacheEntry::rng_subdiff_finfo, and value.
Referenced by calc_hist_selectivity_contained(), calc_hist_selectivity_contains(), and calc_hist_selectivity_scalar().
|
static |
Definition at line 657 of file rangetypes_selfuncs.c.
References DatumGetFloat8(), equal(), fb(), lower(), upper(), and value.
Referenced by calc_length_hist_frac().
| Datum rangesel | ( | PG_FUNCTION_ARGS | ) |
Definition at line 108 of file rangetypes_selfuncs.c.
References calc_rangesel(), CLAMP_PROBABILITY, DatumGetRangeTypeP(), default_range_selectivity(), fb(), get_commutator(), get_restriction_variable(), RangeBound::inclusive, IsA, lower(), PG_GETARG_INT32, PG_GETARG_OID, PG_GETARG_POINTER, PG_RETURN_FLOAT8, range_get_typcache(), range_serialize(), ReleaseVariableStats, TypeCacheEntry::rngelemtype, root, TypeCacheEntry::type_id, and upper().
|
static |
Definition at line 628 of file rangetypes_selfuncs.c.
References cmp(), equal(), fb(), lower(), range_cmp_bounds(), upper(), and value.
Referenced by calc_hist_selectivity_contained(), calc_hist_selectivity_contains(), and calc_hist_selectivity_scalar().