MobilityDB  1.0
Functions
timestampset.h File Reference

Basic functions for set of (distinct) timestamps. More...

#include <postgres.h>
#include <catalog/pg_type.h>
#include "timetypes.h"
Include dependency graph for timestampset.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

TimestampTz timestampset_time_n (const TimestampSet *ts, int index)
 Returns the n-th timestamp of the timestamp set value. More...
 
const Periodtimestampset_bbox_ptr (const TimestampSet *ts)
 Returns a pointer to the precomputed bounding box of the timestamp set value. More...
 
void timestampset_bbox (Period *p, const TimestampSet *ts)
 Copy in the first argument the bounding box of the timestamp set value. More...
 
TimestampSettimestampset_make (const TimestampTz *times, int count)
 Construct a timestamp set from an array of timestamps. More...
 
TimestampSettimestampset_make_free (TimestampTz *times, int count)
 Construct a timestamp set from the array of timestamps and free the array after the creation. More...
 
TimestampSettimestampset_copy (const TimestampSet *ts)
 Returns a copy of the timestamp set. More...
 
bool timestampset_find_timestamp (const TimestampSet *ts, TimestampTz t, int *loc)
 Returns the location of the timestamp in the timestamp set value using binary search. More...
 
Datum timestampset_in (PG_FUNCTION_ARGS)
 Input function for timestamp set values. More...
 
Datum timestampset_out (PG_FUNCTION_ARGS)
 Output function for timestamp set values. More...
 
Datum timestampset_send (PG_FUNCTION_ARGS)
 Send function for timestamp set values. More...
 
Datum timestampset_recv (PG_FUNCTION_ARGS)
 Receive function for timestamp set values. More...
 
char * timestampset_to_string (const TimestampSet *ts)
 Returns the string representation of the timestamp set value. More...
 
Datum timestampset_constructor (PG_FUNCTION_ARGS)
 Construct a timestamp set value from an array of timestamp values. More...
 
Datum timestamp_to_timestampset (PG_FUNCTION_ARGS)
 Cast a timestamp value as a timestamp set value. More...
 
Datum timestampset_to_period (PG_FUNCTION_ARGS)
 Returns the bounding period on which the timestamp set value is defined. More...
 
Datum timestampset_mem_size (PG_FUNCTION_ARGS)
 Returns the size in bytes of the timestamp set value. More...
 
Datum timestampset_timespan (PG_FUNCTION_ARGS)
 Returns the timespan of the timestamp set value. More...
 
Datum timestampset_num_timestamps (PG_FUNCTION_ARGS)
 Returns the number of timestamps of the timestamp set value. More...
 
Datum timestampset_start_timestamp (PG_FUNCTION_ARGS)
 Returns the start timestamp of the timestamp set value. More...
 
Datum timestampset_end_timestamp (PG_FUNCTION_ARGS)
 Returns the end timestamp of the timestamp set value. More...
 
Datum timestampset_timestamp_n (PG_FUNCTION_ARGS)
 Returns the n-th timestamp of the timestamp set value. More...
 
Datum timestampset_timestamps (PG_FUNCTION_ARGS)
 Returns the timestamps of the timestamp set value. More...
 
Datum timestampset_shift (PG_FUNCTION_ARGS)
 Shift the period set value by the interval. More...
 
void timestampset_to_period_internal (Period *p, const TimestampSet *ts)
 Returns the bounding period on which the timestamp set value is defined (internal function) More...
 
TimestampTz * timestampset_timestamps_internal (const TimestampSet *ts)
 Returns the timestamps of the timestamp set value (internal function) More...
 
TimestampSettimestampset_shift_internal (const TimestampSet *ts, const Interval *interval)
 Shift the period set value by the interval (internal function) More...
 
Datum timestampset_cmp (PG_FUNCTION_ARGS)
 Returns -1, 0, or 1 depending on whether the first timestamp set value is less than, equal, or greater than the second temporal value. More...
 
Datum timestampset_eq (PG_FUNCTION_ARGS)
 Returns true if the first timestamp set value is equal to the second one. More...
 
Datum timestampset_ne (PG_FUNCTION_ARGS)
 Returns true if the first timestamp set value is different from the second one. More...
 
Datum timestampset_lt (PG_FUNCTION_ARGS)
 Returns true if the first timestamp set value is less than the second one. More...
 
Datum timestampset_le (PG_FUNCTION_ARGS)
 Returns true if the first timestamp set value is less than or equal to the second one. More...
 
Datum timestampset_ge (PG_FUNCTION_ARGS)
 Returns true if the first timestamp set value is greater than or equal to the second one. More...
 
Datum timestampset_gt (PG_FUNCTION_ARGS)
 Returns true if the first timestamp set value is greater than the second one. More...
 
int timestampset_cmp_internal (const TimestampSet *ts1, const TimestampSet *ts2)
 Returns -1, 0, or 1 depending on whether the first timestamp set value is less than, equal, or greater than the second temporal value (internal function) More...
 
bool timestampset_eq_internal (const TimestampSet *ts1, const TimestampSet *ts2)
 Returns true if the first timestamp set value is equal to the second one (internal function) More...
 
bool timestampset_ne_internal (const TimestampSet *ts1, const TimestampSet *ts2)
 Returns true if the first timestamp set value is different from the second one (internal function) More...
 

Detailed Description

Basic functions for set of (distinct) timestamps.