PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | GBT_NUMKEY_R |
struct | Nsrt |
struct | gbtree_ninfo |
Macros | |
#define | penalty_num(result, olower, oupper, nlower, nupper) |
#define | INTERVAL_TO_SEC(ivp) |
#define | GET_FLOAT_DISTANCE(t, arg1, arg2) fabs( ((float8) *((const t *) (arg1))) - ((float8) *((const t *) (arg2))) ) |
Typedefs | |
typedef char | GBT_NUMKEY |
Functions | |
Interval * | abs_interval (Interval *a) |
bool | gbt_num_consistent (const GBT_NUMKEY_R *key, const void *query, const StrategyNumber *strategy, bool is_leaf, const gbtree_ninfo *tinfo, FmgrInfo *flinfo) |
float8 | gbt_num_distance (const GBT_NUMKEY_R *key, const void *query, bool is_leaf, const gbtree_ninfo *tinfo, FmgrInfo *flinfo) |
GIST_SPLITVEC * | gbt_num_picksplit (const GistEntryVector *entryvec, GIST_SPLITVEC *v, const gbtree_ninfo *tinfo, FmgrInfo *flinfo) |
GISTENTRY * | gbt_num_compress (GISTENTRY *entry, const gbtree_ninfo *tinfo) |
GISTENTRY * | gbt_num_fetch (GISTENTRY *entry, const gbtree_ninfo *tinfo) |
void * | gbt_num_union (GBT_NUMKEY *out, const GistEntryVector *entryvec, const gbtree_ninfo *tinfo, FmgrInfo *flinfo) |
bool | gbt_num_same (const GBT_NUMKEY *a, const GBT_NUMKEY *b, const gbtree_ninfo *tinfo, FmgrInfo *flinfo) |
void | gbt_num_bin_union (Datum *u, GBT_NUMKEY *e, const gbtree_ninfo *tinfo, FmgrInfo *flinfo) |
#define GET_FLOAT_DISTANCE | ( | t, | |
arg1, | |||
arg2 | |||
) | fabs( ((float8) *((const t *) (arg1))) - ((float8) *((const t *) (arg2))) ) |
Definition at line 89 of file btree_utils_num.h.
#define INTERVAL_TO_SEC | ( | ivp | ) |
Definition at line 84 of file btree_utils_num.h.
#define penalty_num | ( | result, | |
olower, | |||
oupper, | |||
nlower, | |||
nupper | |||
) |
Definition at line 63 of file btree_utils_num.h.
typedef char GBT_NUMKEY |
Definition at line 13 of file btree_utils_num.h.
Definition at line 114 of file btree_interval.c.
References a, DatumGetBool(), DatumGetIntervalP(), DirectFunctionCall1, DirectFunctionCall2, interval_lt(), interval_um(), and IntervalPGetDatum().
Referenced by interval_dist(), time_dist(), ts_dist(), and tstz_dist().
void gbt_num_bin_union | ( | Datum * | u, |
GBT_NUMKEY * | e, | ||
const gbtree_ninfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 228 of file btree_utils_num.c.
References DatumGetPointer(), gbtree_vinfo::f_gt, gbtree_vinfo::f_lt, GBT_NUMKEY_R::lower, palloc0(), PointerGetDatum(), tinfo, unconstify, and GBT_NUMKEY_R::upper.
Referenced by gbt_num_picksplit().
GISTENTRY* gbt_num_compress | ( | GISTENTRY * | entry, |
const gbtree_ninfo * | tinfo | ||
) |
Definition at line 14 of file btree_utils_num.c.
References Assert, DatumGetBool(), DatumGetCash(), DatumGetDateADT(), DatumGetFloat4(), DatumGetFloat8(), DatumGetInt16(), DatumGetInt32(), DatumGetInt64(), DatumGetObjectId(), DatumGetPointer(), DatumGetTimeADT(), DatumGetTimestamp(), gbt_t_bool, gbt_t_cash, gbt_t_date, gbt_t_enum, gbt_t_float4, gbt_t_float8, gbt_t_int2, gbt_t_int4, gbt_t_int8, gbt_t_oid, gbt_t_time, gbt_t_ts, gistentryinit, GISTENTRY::key, GISTENTRY::leafkey, GISTENTRY::offset, GISTENTRY::page, palloc(), palloc0(), PointerGetDatum(), GISTENTRY::rel, gbtree_vinfo::t, tinfo, and tm.
Referenced by gbt_bool_compress(), gbt_cash_compress(), gbt_date_compress(), gbt_enum_compress(), gbt_float4_compress(), gbt_float8_compress(), gbt_int2_compress(), gbt_int4_compress(), gbt_int8_compress(), gbt_macad8_compress(), gbt_macad_compress(), gbt_oid_compress(), gbt_time_compress(), and gbt_ts_compress().
bool gbt_num_consistent | ( | const GBT_NUMKEY_R * | key, |
const void * | query, | ||
const StrategyNumber * | strategy, | ||
bool | is_leaf, | ||
const gbtree_ninfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 263 of file btree_utils_num.c.
References BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, BtreeGistNotEqualStrategyNumber, gbtree_vinfo::f_eq, gbtree_vinfo::f_ge, gbtree_vinfo::f_gt, gbtree_vinfo::f_le, gbtree_vinfo::f_lt, sort-test::key, and tinfo.
Referenced by gbt_bool_consistent(), gbt_cash_consistent(), gbt_date_consistent(), gbt_enum_consistent(), gbt_float4_consistent(), gbt_float8_consistent(), gbt_inet_consistent(), gbt_int2_consistent(), gbt_int4_consistent(), gbt_int8_consistent(), gbt_intv_consistent(), gbt_macad8_consistent(), gbt_macad_consistent(), gbt_oid_consistent(), gbt_time_consistent(), gbt_timetz_consistent(), gbt_ts_consistent(), gbt_tstz_consistent(), and gbt_uuid_consistent().
float8 gbt_num_distance | ( | const GBT_NUMKEY_R * | key, |
const void * | query, | ||
bool | is_leaf, | ||
const gbtree_ninfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 316 of file btree_utils_num.c.
References elog, ERROR, gbtree_vinfo::f_ge, gbtree_vinfo::f_le, sort-test::key, gbtree_vinfo::t, and tinfo.
Referenced by gbt_cash_distance(), gbt_date_distance(), gbt_float4_distance(), gbt_float8_distance(), gbt_int2_distance(), gbt_int4_distance(), gbt_int8_distance(), gbt_intv_distance(), gbt_oid_distance(), gbt_time_distance(), gbt_ts_distance(), and gbt_tstz_distance().
GISTENTRY* gbt_num_fetch | ( | GISTENTRY * | entry, |
const gbtree_ninfo * | tinfo | ||
) |
Definition at line 107 of file btree_utils_num.c.
References Assert, BoolGetDatum(), CashGetDatum(), DateADTGetDatum(), Float4GetDatum(), Float8GetDatum(), gbt_t_bool, gbt_t_cash, gbt_t_date, gbt_t_enum, gbt_t_float4, gbt_t_float8, gbt_t_int2, gbt_t_int4, gbt_t_int8, gbt_t_oid, gbt_t_time, gbt_t_ts, gistentryinit, Int16GetDatum(), Int32GetDatum(), Int64GetDatum(), GISTENTRY::key, ObjectIdGetDatum(), GISTENTRY::offset, GISTENTRY::page, palloc(), GISTENTRY::rel, gbtree_vinfo::t, TimeADTGetDatum(), TimestampGetDatum(), and tinfo.
Referenced by gbt_bool_fetch(), gbt_cash_fetch(), gbt_date_fetch(), gbt_enum_fetch(), gbt_float4_fetch(), gbt_float8_fetch(), gbt_int2_fetch(), gbt_int4_fetch(), gbt_int8_fetch(), gbt_intv_fetch(), gbt_macad8_fetch(), gbt_macad_fetch(), gbt_oid_fetch(), gbt_time_fetch(), gbt_ts_fetch(), and gbt_uuid_fetch().
GIST_SPLITVEC* gbt_num_picksplit | ( | const GistEntryVector * | entryvec, |
GIST_SPLITVEC * | v, | ||
const gbtree_ninfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 339 of file btree_utils_num.c.
References DatumGetPointer(), gbtree_vinfo::f_cmp, FirstOffsetNumber, gbt_num_bin_union(), Nsrt::i, i, GISTENTRY::key, GistEntryVector::n, OffsetNumberNext, palloc(), PointerGetDatum(), qsort_arg(), GIST_SPLITVEC::spl_ldatum, GIST_SPLITVEC::spl_left, GIST_SPLITVEC::spl_nleft, GIST_SPLITVEC::spl_nright, GIST_SPLITVEC::spl_rdatum, GIST_SPLITVEC::spl_right, Nsrt::t, tinfo, and GistEntryVector::vector.
Referenced by gbt_bool_picksplit(), gbt_cash_picksplit(), gbt_date_picksplit(), gbt_enum_picksplit(), gbt_float4_picksplit(), gbt_float8_picksplit(), gbt_inet_picksplit(), gbt_int2_picksplit(), gbt_int4_picksplit(), gbt_int8_picksplit(), gbt_intv_picksplit(), gbt_macad8_picksplit(), gbt_macad_picksplit(), gbt_oid_picksplit(), gbt_time_picksplit(), gbt_ts_picksplit(), and gbt_uuid_picksplit().
bool gbt_num_same | ( | const GBT_NUMKEY * | a, |
const GBT_NUMKEY * | b, | ||
const gbtree_ninfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 212 of file btree_utils_num.c.
References a, b, gbtree_vinfo::f_eq, GBT_NUMKEY_R::lower, tinfo, and GBT_NUMKEY_R::upper.
Referenced by gbt_bool_same(), gbt_cash_same(), gbt_date_same(), gbt_enum_same(), gbt_float4_same(), gbt_float8_same(), gbt_inet_same(), gbt_int2_same(), gbt_int4_same(), gbt_int8_same(), gbt_intv_same(), gbt_macad8_same(), gbt_macad_same(), gbt_oid_same(), gbt_time_same(), gbt_ts_same(), and gbt_uuid_same().
void* gbt_num_union | ( | GBT_NUMKEY * | out, |
const GistEntryVector * | entryvec, | ||
const gbtree_ninfo * | tinfo, | ||
FmgrInfo * | flinfo | ||
) |
Definition at line 172 of file btree_utils_num.c.
References cur, DatumGetPointer(), gbtree_vinfo::f_gt, gbtree_vinfo::f_lt, i, GISTENTRY::key, GBT_NUMKEY_R::lower, GistEntryVector::n, tinfo, unconstify, GBT_NUMKEY_R::upper, and GistEntryVector::vector.
Referenced by gbt_bool_union(), gbt_cash_union(), gbt_date_union(), gbt_enum_union(), gbt_float4_union(), gbt_float8_union(), gbt_inet_union(), gbt_int2_union(), gbt_int4_union(), gbt_int8_union(), gbt_intv_union(), gbt_macad8_union(), gbt_macad_union(), gbt_oid_union(), gbt_time_union(), gbt_ts_union(), and gbt_uuid_union().