PostgreSQL Source Code git master
|
#include "postgres.h"
#include <limits.h>
#include "btree_gist.h"
#include "btree_utils_num.h"
#include "utils/fmgrprotos.h"
#include "utils/timestamp.h"
#include "utils/float.h"
Go to the source code of this file.
Data Structures | |
struct | tsKEY |
Macros | |
#define | TimestampGetDatumFast(X) PointerGetDatum(&(X)) |
#define | penalty_check_max_float(val) |
Variables | |
static const gbtree_ninfo | tinfo |
#define penalty_check_max_float | ( | val | ) |
Definition at line 344 of file btree_ts.c.
#define TimestampGetDatumFast | ( | X | ) | PointerGetDatum(&(X)) |
Definition at line 39 of file btree_ts.c.
Datum gbt_ts_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 208 of file btree_ts.c.
References gbt_num_compress(), PG_GETARG_POINTER, PG_RETURN_POINTER, and tinfo.
Datum gbt_ts_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 251 of file btree_ts.c.
References DatumGetPointer(), gbt_num_consistent(), GIST_LEAF, GISTENTRY::key, sort-test::key, tsKEY::lower, PG_GETARG_POINTER, PG_GETARG_TIMESTAMP, PG_GETARG_UINT16, PG_RETURN_BOOL, tinfo, and tsKEY::upper.
Definition at line 114 of file btree_ts.c.
References a, b, DatumGetIntervalP(), DirectFunctionCall2, get_float8_infinity(), i, INTERVAL_TO_SEC, timestamp_mi(), TIMESTAMP_NOT_FINITE, and TimestampGetDatumFast.
Datum gbt_ts_distance | ( | PG_FUNCTION_ARGS | ) |
Definition at line 273 of file btree_ts.c.
References DatumGetPointer(), gbt_num_distance(), GIST_LEAF, GISTENTRY::key, sort-test::key, tsKEY::lower, PG_GETARG_POINTER, PG_GETARG_TIMESTAMP, PG_RETURN_FLOAT8, tinfo, and tsKEY::upper.
Datum gbt_ts_fetch | ( | PG_FUNCTION_ARGS | ) |
Definition at line 243 of file btree_ts.c.
References gbt_num_fetch(), PG_GETARG_POINTER, PG_RETURN_POINTER, and tinfo.
Datum gbt_ts_penalty | ( | PG_FUNCTION_ARGS | ) |
Definition at line 354 of file btree_ts.c.
References DatumGetPointer(), sort-test::key, tsKEY::lower, penalty_check_max_float, penalty_num, PG_GETARG_POINTER, PG_RETURN_POINTER, and tsKEY::upper.
Datum gbt_ts_picksplit | ( | PG_FUNCTION_ARGS | ) |
Definition at line 384 of file btree_ts.c.
References gbt_num_picksplit(), PG_GETARG_POINTER, PG_RETURN_POINTER, and tinfo.
Datum gbt_ts_same | ( | PG_FUNCTION_ARGS | ) |
Definition at line 392 of file btree_ts.c.
References gbt_num_same(), PG_GETARG_POINTER, PG_RETURN_POINTER, and tinfo.
Datum gbt_ts_union | ( | PG_FUNCTION_ARGS | ) |
Definition at line 334 of file btree_ts.c.
References gbt_num_union(), palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, and tinfo.
|
static |
Definition at line 66 of file btree_ts.c.
References a, b, DatumGetBool(), DirectFunctionCall2, timestamp_eq(), and TimestampGetDatumFast.
|
static |
Definition at line 55 of file btree_ts.c.
References a, b, DatumGetBool(), DirectFunctionCall2, timestamp_ge(), and TimestampGetDatumFast.
|
static |
Definition at line 44 of file btree_ts.c.
References a, b, DatumGetBool(), DirectFunctionCall2, timestamp_gt(), and TimestampGetDatumFast.
|
static |
Definition at line 100 of file btree_ts.c.
References a, b, DatumGetInt32(), DirectFunctionCall2, tsKEY::lower, res, timestamp_cmp(), TimestampGetDatumFast, and tsKEY::upper.
|
static |
Definition at line 77 of file btree_ts.c.
References a, b, DatumGetBool(), DirectFunctionCall2, timestamp_le(), and TimestampGetDatumFast.
|
static |
Definition at line 88 of file btree_ts.c.
References a, b, DatumGetBool(), DirectFunctionCall2, timestamp_lt(), and TimestampGetDatumFast.
Datum gbt_tstz_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 217 of file btree_ts.c.
References DatumGetTimestampTz(), gistentryinit, gmt, GISTENTRY::key, GISTENTRY::leafkey, tsKEY::lower, GISTENTRY::offset, GISTENTRY::page, palloc(), PG_GETARG_POINTER, PG_RETURN_POINTER, PointerGetDatum(), GISTENTRY::rel, tstz_to_ts_gmt(), and tsKEY::upper.
Datum gbt_tstz_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 290 of file btree_ts.c.
References DatumGetPointer(), gbt_num_consistent(), GIST_LEAF, GISTENTRY::key, sort-test::key, MAXALIGN, PG_GETARG_POINTER, PG_GETARG_TIMESTAMPTZ, PG_GETARG_UINT16, PG_RETURN_BOOL, gbtree_ninfo::size, tinfo, and tstz_to_ts_gmt().
Datum gbt_tstz_distance | ( | PG_FUNCTION_ARGS | ) |
Definition at line 314 of file btree_ts.c.
References DatumGetPointer(), gbt_num_distance(), GIST_LEAF, GISTENTRY::key, sort-test::key, MAXALIGN, PG_GETARG_POINTER, PG_GETARG_TIMESTAMPTZ, PG_RETURN_FLOAT8, gbtree_ninfo::size, tinfo, and tstz_to_ts_gmt().
PG_FUNCTION_INFO_V1 | ( | gbt_ts_compress | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_consistent | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_distance | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_fetch | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_penalty | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_picksplit | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_same | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_union | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_tstz_compress | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_tstz_consistent | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_tstz_distance | ) |
PG_FUNCTION_INFO_V1 | ( | ts_dist | ) |
PG_FUNCTION_INFO_V1 | ( | tstz_dist | ) |
Datum ts_dist | ( | PG_FUNCTION_ARGS | ) |
Definition at line 147 of file btree_ts.c.
References a, abs_interval(), b, DatumGetIntervalP(), Interval::day, DirectFunctionCall2, Interval::month, palloc(), PG_GETARG_DATUM, PG_GETARG_TIMESTAMP, PG_INT64_MAX, PG_RETURN_INTERVAL_P, Interval::time, timestamp_mi(), and TIMESTAMP_NOT_FINITE.
Datum tstz_dist | ( | PG_FUNCTION_ARGS | ) |
Definition at line 171 of file btree_ts.c.
References a, abs_interval(), b, DatumGetIntervalP(), Interval::day, DirectFunctionCall2, Interval::month, palloc(), PG_GETARG_DATUM, PG_GETARG_TIMESTAMPTZ, PG_INT64_MAX, PG_RETURN_INTERVAL_P, Interval::time, timestamp_mi(), and TIMESTAMP_NOT_FINITE.
|
inlinestatic |
Definition at line 200 of file btree_ts.c.
Referenced by gbt_tstz_compress(), gbt_tstz_consistent(), and gbt_tstz_distance().
|
static |
Definition at line 130 of file btree_ts.c.
Referenced by gbt_ts_compress(), gbt_ts_consistent(), gbt_ts_distance(), gbt_ts_fetch(), gbt_ts_picksplit(), gbt_ts_same(), gbt_ts_union(), gbt_tstz_consistent(), and gbt_tstz_distance().