36 #ifndef __RANGETYPES_EXT_H__ 37 #define __RANGETYPES_EXT_H__ 40 #include <catalog/pg_type.h> 41 #include <utils/rangetypes.h> 51 #if POSTGRESQL_VERSION_NUMBER < 130000 55 extern bool lower_inc(
const RangeType *range);
56 extern bool upper_inc(
const RangeType *range);
59 extern void range_bounds(
const RangeType *range,
double *xmin,
double *xmax);
General functions for temporal types.
Datum lower_datum(const RangeType *range)
Returns the string representation of the range value, used for debugging.
Definition: rangetypes_ext.c:68
RangeType * range_make(Datum from, Datum to, bool lower_inc, bool upper_inc, Oid basetypid)
Construct a range value from given arguments.
Definition: rangetypes_ext.c:138
Datum range_adjacent_elem(PG_FUNCTION_ARGS)
Returns true if the range value and the value are adjacent.
Definition: rangetypes_ext.c:509
Datum intrange_canonical(PG_FUNCTION_ARGS)
Canonical function for defining the intrange type.
Definition: rangetypes_ext.c:329
const char * range_to_string(const RangeType *range)
void range_bounds(const RangeType *range, double *xmin, double *xmax)
Get the bounds of the range as double values.
Definition: rangetypes_ext.c:119
Datum range_left_elem(PG_FUNCTION_ARGS)
Returns true if the range value is strictly to the left of the value.
Definition: rangetypes_ext.c:469
Datum range_overright_elem(PG_FUNCTION_ARGS)
Returns true if the range value does not extend to the left of the value.
Definition: rangetypes_ext.c:499
RangeType ** rangearr_normalize(RangeType **ranges, int count, int *newcount)
Normalize an array of ranges, which may be non contiguous.
Definition: rangetypes_ext.c:233
Datum elem_adjacent_range(PG_FUNCTION_ARGS)
Returns true if the value and the range value are adjacent.
Definition: rangetypes_ext.c:597
Datum elem_overright_range(PG_FUNCTION_ARGS)
Returns true if the value does not extend to the left of the range value.
Definition: rangetypes_ext.c:587
Datum elem_overleft_range(PG_FUNCTION_ARGS)
Returns true if the value does not extend to the right of the range value.
Definition: rangetypes_ext.c:567
bool upper_inc(RangeType *range)
Returns true if the upper bound of the range value is inclusive.
Definition: rangetypes_ext.c:104
Datum range_overleft_elem(PG_FUNCTION_ARGS)
Returns true if the range value does not extend to the right of the value.
Definition: rangetypes_ext.c:479
Datum upper_datum(const RangeType *range)
Returns the upper bound of the range value.
Definition: rangetypes_ext.c:77
bool lower_inc(RangeType *range)
Returns true if the lower bound of the range value is inclusive.
Definition: rangetypes_ext.c:91
Datum range_right_elem(PG_FUNCTION_ARGS)
Returns true if the range value is strictly to the right of the value.
Definition: rangetypes_ext.c:489
Datum elem_left_range(PG_FUNCTION_ARGS)
Returns true if the value is strictly to the left of the range value.
Definition: rangetypes_ext.c:557
Datum elem_right_range(PG_FUNCTION_ARGS)
Returns true if the value is strictly to the right of the range value.
Definition: rangetypes_ext.c:577