MobilityDB
1.0
|
Extended operators for range types. More...
#include "general/rangetypes_ext.h"
#include <assert.h>
#include <float.h>
#include <utils/builtins.h>
#include "general/temporal.h"
#include "general/tempcache.h"
#include "general/temporal_util.h"
#include "general/tnumber_mathfuncs.h"
Functions | |
Datum | lower_datum (const RangeType *range) |
Returns the string representation of the range value, used for debugging. More... | |
Datum | upper_datum (const RangeType *range) |
Returns the upper bound of the range value. More... | |
bool | lower_inc (RangeType *range) |
Returns true if the lower bound of the range value is inclusive. More... | |
bool | upper_inc (RangeType *range) |
Returns true if the upper bound of the range value is inclusive. More... | |
void | range_bounds (const RangeType *range, double *xmin, double *xmax) |
Get the bounds of the range as double values. More... | |
RangeType * | range_make (Datum from, Datum to, bool lower_inc, bool upper_inc, Oid basetypid) |
Construct a range value from given arguments. More... | |
static RangeType * | range_copy (const RangeType *range) |
Construct a range value from given arguments. More... | |
static RangeType * | range_union_internal (TypeCacheEntry *typcache, RangeType *r1, RangeType *r2, bool strict) |
Returns the union of the range values. More... | |
RangeType ** | rangearr_normalize (RangeType **ranges, int count, int *newcount) |
Normalize an array of ranges, which may be non contiguous. More... | |
Datum | range_func_elem1 (FunctionCallInfo fcinfo, RangeType *range, Datum val, bool(*func)(TypeCacheEntry *, RangeBound, RangeBound, Datum)) |
Returns true if the range value and the element satisfy the function. More... | |
Datum | range_func_elem (FunctionCallInfo fcinfo, bool(*func)(TypeCacheEntry *, RangeBound, RangeBound, Datum)) |
Returns true if the range value and the element satisfy the function. More... | |
PGDLLEXPORT Datum | elem_func_range (FunctionCallInfo fcinfo, bool(*func)(TypeCacheEntry *, RangeBound, RangeBound, Datum)) |
Returns true if the element and the range value satisfy the function. More... | |
PGDLLEXPORT Datum | intrange_canonical (PG_FUNCTION_ARGS) |
Canonical function for defining the intrange type. More... | |
bool | range_left_elem_internal (TypeCacheEntry *typcache, RangeBound lower_bound, RangeBound upper_bound, Datum val) |
Returns true if the range value is strictly to the left of the value (internal function) More... | |
bool | range_overleft_elem_internal (TypeCacheEntry *typcache, RangeBound lower_bound, RangeBound upper_bound, Datum val) |
Returns true if the range value does not extend to the right of the value (internal function) More... | |
bool | range_right_elem_internal (TypeCacheEntry *typcache, RangeBound lower_bound, RangeBound upper_bound, Datum val) |
Returns true if the range value is strictly to the right of the value (internal function) More... | |
bool | range_overright_elem_internal (TypeCacheEntry *typcache, RangeBound lower_bound, RangeBound upper_bound, Datum val) |
Returns true if the range value does not extend to the left of the value (internal function) More... | |
bool | range_adjacent_elem_internal (TypeCacheEntry *typcache, RangeBound lower_bound, RangeBound upper_bound, Datum val) |
Returns true if the range value and the value are adjacent (internal function) More... | |
PGDLLEXPORT Datum | range_left_elem (PG_FUNCTION_ARGS) |
Returns true if the range value is strictly to the left of the value. More... | |
PGDLLEXPORT Datum | range_overleft_elem (PG_FUNCTION_ARGS) |
Returns true if the range value does not extend to the right of the value. More... | |
PGDLLEXPORT Datum | range_right_elem (PG_FUNCTION_ARGS) |
Returns true if the range value is strictly to the right of the value. More... | |
PGDLLEXPORT Datum | range_overright_elem (PG_FUNCTION_ARGS) |
Returns true if the range value does not extend to the left of the value. More... | |
PGDLLEXPORT Datum | range_adjacent_elem (PG_FUNCTION_ARGS) |
Returns true if the range value and the value are adjacent. More... | |
bool | elem_overleft_range_internal (TypeCacheEntry *typcache, RangeBound lower_bound, RangeBound upper_bound, Datum val) |
Returns true if the value does not extend to the right of the range value (internal function) More... | |
bool | elem_overright_range_internal (TypeCacheEntry *typcache, RangeBound lower_bound, RangeBound upper_bound, Datum val) |
Returns true if the value does not extend to the left of the range value (internal function) More... | |
PGDLLEXPORT Datum | elem_left_range (PG_FUNCTION_ARGS) |
Returns true if the value is strictly to the left of the range value. More... | |
PGDLLEXPORT Datum | elem_overleft_range (PG_FUNCTION_ARGS) |
Returns true if the value does not extend to the right of the range value. More... | |
PGDLLEXPORT Datum | elem_right_range (PG_FUNCTION_ARGS) |
Returns true if the value is strictly to the right of the range value. More... | |
PGDLLEXPORT Datum | elem_overright_range (PG_FUNCTION_ARGS) |
Returns true if the value does not extend to the left of the range value. More... | |
PGDLLEXPORT Datum | elem_adjacent_range (PG_FUNCTION_ARGS) |
Returns true if the value and the range value are adjacent. More... | |
PGDLLEXPORT Datum | floatrange_set_precision (PG_FUNCTION_ARGS) |
Set the precision of the float range to the number of decimal places. More... | |
PGDLLEXPORT Datum | range_extent_transfn (PG_FUNCTION_ARGS) |
Transition function for temporal extent aggregation of period values with period bounding box. More... | |
PGDLLEXPORT Datum | range_extent_combinefn (PG_FUNCTION_ARGS) |
Combine function for temporal extent aggregation. More... | |
Extended operators for range types.
These operators have been submitted as a PR to PostgreSQL.