36 #ifndef __TIME_SELFUNCS_H__ 37 #define __TIME_SELFUNCS_H__ 40 #include <catalog/pg_type.h> 41 #include <utils/selfuncs.h> 54 Datum *length_hist_values,
int length_hist_nvalues);
57 Datum *length_hist_values,
int length_hist_nvalues);
63 int length_hist_nvalues,
double value,
bool equal);
66 double length1,
double length2,
bool equal);
double calc_period_hist_selectivity_scalar(PeriodBound *constbound, PeriodBound *hist, int hist_nvalues, bool equal)
Definition: time_selfuncs.c:363
double calc_period_hist_selectivity(VariableStatData *vardata, const Period *constval, CachedOp cachedOp)
Definition: time_selfuncs.c:162
Structure to represent periods.
Definition: timetypes.h:52
Internal representation of either bound of a period (not what's on disk)
Definition: timetypes.h:63
double calc_length_hist_frac(Datum *length_hist_values, int length_hist_nvalues, double length1, double length2, bool equal)
Definition: time_selfuncs.c:467
double calc_period_hist_selectivity_adjacent(PeriodBound *lower, PeriodBound *upper, PeriodBound *hist_lower, PeriodBound *hist_upper, int hist_nvalues)
Definition: time_selfuncs.c:810
double calc_period_hist_selectivity_contains(PeriodBound *lower, PeriodBound *upper, PeriodBound *hist_lower, int hist_nvalues, Datum *length_hist_values, int length_hist_nvalues)
Definition: time_selfuncs.c:738
Functions for time types based on TimestampTz, that is, TimestampSet, Period, and PeriodSet...
CachedOp
Enumeration that defines the classes of Boolean operators used in MobilityDB.
Definition: tempcache.h:108
Datum timestampset_analyze(PG_FUNCTION_ARGS)
Compute statistics for timestamp set columns.
Definition: time_analyze.c:391
Datum periodset_analyze(PG_FUNCTION_ARGS)
Compute statistics for period set columns.
Definition: time_analyze.c:427
double get_len_position(double value, double hist1, double hist2)
Definition: time_selfuncs.c:417
Datum period_analyze(PG_FUNCTION_ARGS)
Compute statistics for period columns.
Definition: time_analyze.c:355
Selectivity functions for temporal types.
double calc_period_hist_selectivity_contained(PeriodBound *lower, PeriodBound *upper, PeriodBound *hist_lower, int hist_nvalues, Datum *length_hist_values, int length_hist_nvalues)
Definition: time_selfuncs.c:631
int length_hist_bsearch(Datum *length_hist_values, int length_hist_nvalues, double value, bool equal)
Definition: time_selfuncs.c:393