PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <limits.h>
#include "btree_gist.h"
#include "btree_utils_num.h"
#include "utils/builtins.h"
#include "utils/datetime.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 347 of file btree_ts.c.
Referenced by gbt_ts_penalty().
#define TimestampGetDatumFast | ( | X | ) | PointerGetDatum(&(X)) |
Definition at line 38 of file btree_ts.c.
Referenced by gbt_ts_dist(), gbt_tseq(), gbt_tsge(), gbt_tsgt(), gbt_tskey_cmp(), gbt_tsle(), and gbt_tslt().
Datum gbt_ts_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 207 of file btree_ts.c.
References gbt_num_compress(), PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum gbt_ts_consistent | ( | PG_FUNCTION_ARGS | ) |
Definition at line 250 of file btree_ts.c.
References DatumGetPointer, gbt_num_consistent(), GIST_LEAF, GISTENTRY::key, tsKEY::lower, GBT_NUMKEY_R::lower, PG_GETARG_POINTER, PG_GETARG_TIMESTAMP, PG_GETARG_UINT16, PG_RETURN_BOOL, tsKEY::upper, and GBT_NUMKEY_R::upper.
Definition at line 113 of file btree_ts.c.
References Abs, 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, tsKEY::lower, GBT_NUMKEY_R::lower, PG_GETARG_POINTER, PG_GETARG_TIMESTAMP, PG_RETURN_FLOAT8, tsKEY::upper, and GBT_NUMKEY_R::upper.
Datum gbt_ts_fetch | ( | PG_FUNCTION_ARGS | ) |
Definition at line 242 of file btree_ts.c.
References gbt_num_fetch(), PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum gbt_ts_penalty | ( | PG_FUNCTION_ARGS | ) |
Definition at line 356 of file btree_ts.c.
References DatumGetPointer, 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 387 of file btree_ts.c.
References gbt_num_picksplit(), PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum gbt_ts_same | ( | PG_FUNCTION_ARGS | ) |
Definition at line 397 of file btree_ts.c.
References gbt_num_same(), PG_GETARG_POINTER, and PG_RETURN_POINTER.
Datum gbt_ts_union | ( | PG_FUNCTION_ARGS | ) |
Definition at line 337 of file btree_ts.c.
References gbt_num_union(), palloc(), PG_GETARG_POINTER, and PG_RETURN_POINTER.
Definition at line 65 of file btree_ts.c.
References DatumGetBool, DirectFunctionCall2, timestamp_eq(), and TimestampGetDatumFast.
Definition at line 54 of file btree_ts.c.
References DatumGetBool, DirectFunctionCall2, timestamp_ge(), and TimestampGetDatumFast.
Definition at line 43 of file btree_ts.c.
References DatumGetBool, DirectFunctionCall2, timestamp_gt(), and TimestampGetDatumFast.
|
static |
Definition at line 99 of file btree_ts.c.
References DatumGetInt32, DirectFunctionCall2, tsKEY::lower, timestamp_cmp(), TimestampGetDatumFast, and tsKEY::upper.
Definition at line 76 of file btree_ts.c.
References DatumGetBool, DirectFunctionCall2, timestamp_le(), and TimestampGetDatumFast.
Definition at line 87 of file btree_ts.c.
References DatumGetBool, DirectFunctionCall2, timestamp_lt(), and TimestampGetDatumFast.
Datum gbt_tstz_compress | ( | PG_FUNCTION_ARGS | ) |
Definition at line 216 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 291 of file btree_ts.c.
References DatumGetPointer, gbt_num_consistent(), GIST_LEAF, GISTENTRY::key, GBT_NUMKEY_R::lower, MAXALIGN, PG_GETARG_POINTER, PG_GETARG_TIMESTAMPTZ, PG_GETARG_UINT16, PG_RETURN_BOOL, gbtree_ninfo::size, tstz_to_ts_gmt(), and GBT_NUMKEY_R::upper.
Datum gbt_tstz_distance | ( | PG_FUNCTION_ARGS | ) |
Definition at line 316 of file btree_ts.c.
References DatumGetPointer, gbt_num_distance(), GIST_LEAF, GISTENTRY::key, GBT_NUMKEY_R::lower, MAXALIGN, PG_GETARG_POINTER, PG_GETARG_TIMESTAMPTZ, PG_RETURN_FLOAT8, gbtree_ninfo::size, tstz_to_ts_gmt(), and GBT_NUMKEY_R::upper.
PG_FUNCTION_INFO_V1 | ( | gbt_ts_compress | ) |
Referenced by ts_dist().
PG_FUNCTION_INFO_V1 | ( | gbt_tstz_compress | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_fetch | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_union | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_picksplit | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_consistent | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_distance | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_tstz_consistent | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_tstz_distance | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_penalty | ) |
PG_FUNCTION_INFO_V1 | ( | gbt_ts_same | ) |
PG_FUNCTION_INFO_V1 | ( | ts_dist | ) |
PG_FUNCTION_INFO_V1 | ( | tstz_dist | ) |
Datum ts_dist | ( | PG_FUNCTION_ARGS | ) |
Definition at line 146 of file btree_ts.c.
References abs_interval(), DatumGetIntervalP, Interval::day, DirectFunctionCall2, Interval::month, palloc(), PG_FUNCTION_INFO_V1(), PG_GETARG_DATUM, PG_GETARG_TIMESTAMP, PG_INT64_MAX, PG_RETURN_INTERVAL_P, Interval::time, timestamp_mi(), TIMESTAMP_NOT_FINITE, and tstz_dist().
Datum tstz_dist | ( | PG_FUNCTION_ARGS | ) |
Definition at line 170 of file btree_ts.c.
References abs_interval(), 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.
Referenced by ts_dist().
|
inlinestatic |
Definition at line 199 of file btree_ts.c.
Referenced by gbt_tstz_compress(), gbt_tstz_consistent(), and gbt_tstz_distance().
|
static |
Definition at line 129 of file btree_ts.c.