36 #ifndef __TIMESTAMPSET_H__ 37 #define __TIMESTAMPSET_H__ 40 #include <catalog/pg_type.h> Structure to represent periods.
Definition: timetypes.h:52
Datum timestampset_le(PG_FUNCTION_ARGS)
Returns true if the first timestamp set value is less than or equal to the second one...
Definition: timestampset.c:640
TimestampTz timestampset_time_n(const TimestampSet *ts, int index)
Returns the n-th timestamp of the timestamp set value.
Definition: timestampset.c:55
TimestampSet * timestampset_make(const TimestampTz *times, int count)
Construct a timestamp set from an array of timestamps.
Definition: timestampset.c:97
void timestampset_bbox(Period *p, const TimestampSet *ts)
Copy in the first argument the bounding box of the timestamp set value.
Definition: timestampset.c:73
Datum timestampset_recv(PG_FUNCTION_ARGS)
Receive function for timestamp set values.
Definition: timestampset.c:280
Datum timestampset_ge(PG_FUNCTION_ARGS)
Returns true if the first timestamp set value is greater than or equal to the second one...
Definition: timestampset.c:656
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) ...
Definition: timestampset.c:560
Datum timestampset_start_timestamp(PG_FUNCTION_ARGS)
Returns the start timestamp of the timestamp set value.
Definition: timestampset.c:402
Datum timestampset_constructor(PG_FUNCTION_ARGS)
Construct a timestamp set value from an array of timestamp values.
Definition: timestampset.c:300
Datum timestampset_timespan(PG_FUNCTION_ARGS)
Returns the timespan of the timestamp set value.
Definition: timestampset.c:374
Datum timestampset_eq(PG_FUNCTION_ARGS)
Returns true if the first timestamp set value is equal to the second one.
Definition: timestampset.c:581
Datum timestampset_gt(PG_FUNCTION_ARGS)
Returns true if the first timestamp set value is greater than the second one.
Definition: timestampset.c:671
Datum timestampset_shift(PG_FUNCTION_ARGS)
Shift the period set value by the interval.
Definition: timestampset.c:491
Functions for time types based on TimestampTz, that is, TimestampSet, Period, and PeriodSet...
TimestampSet * timestampset_shift_internal(const TimestampSet *ts, const Interval *interval)
Shift the period set value by the interval (internal function)
Definition: timestampset.c:473
Structure to represent timestamp sets.
Definition: timetypes.h:73
Datum timestampset_to_period(PG_FUNCTION_ARGS)
Returns the bounding period on which the timestamp set value is defined.
Definition: timestampset.c:344
Datum timestampset_in(PG_FUNCTION_ARGS)
Input function for timestamp set values.
Definition: timestampset.c:212
Datum timestampset_timestamps(PG_FUNCTION_ARGS)
Returns the timestamps of the timestamp set value.
Definition: timestampset.c:459
Datum timestampset_mem_size(PG_FUNCTION_ARGS)
Returns the size in bytes of the timestamp set value.
Definition: timestampset.c:361
const Period * timestampset_bbox_ptr(const TimestampSet *ts)
Returns a pointer to the precomputed bounding box of the timestamp set value.
Definition: timestampset.c:64
Datum timestampset_end_timestamp(PG_FUNCTION_ARGS)
Returns the end timestamp of the timestamp set value.
Definition: timestampset.c:415
Datum timestampset_ne(PG_FUNCTION_ARGS)
Returns true if the first timestamp set value is different from the second one.
Definition: timestampset.c:608
Datum timestampset_timestamp_n(PG_FUNCTION_ARGS)
Returns the n-th timestamp of the timestamp set value.
Definition: timestampset.c:428
Datum timestampset_out(PG_FUNCTION_ARGS)
Output function for timestamp set values.
Definition: timestampset.c:241
Datum timestampset_lt(PG_FUNCTION_ARGS)
Returns true if the first timestamp set value is less than the second one.
Definition: timestampset.c:624
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.
Definition: timestampset.c:543
Datum timestampset_num_timestamps(PG_FUNCTION_ARGS)
Returns the number of timestamps of the timestamp set value.
Definition: timestampset.c:390
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)
Definition: timestampset.c:512
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.
Definition: timestampset.c:177
Datum timestamp_to_timestampset(PG_FUNCTION_ARGS)
Cast a timestamp value as a timestamp set value.
Definition: timestampset.c:320
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) ...
Definition: timestampset.c:598
TimestampTz * timestampset_timestamps_internal(const TimestampSet *ts)
Returns the timestamps of the timestamp set value (internal function)
Definition: timestampset.c:446
Datum timestampset_send(PG_FUNCTION_ARGS)
Send function for timestamp set values.
Definition: timestampset.c:254
TimestampSet * timestampset_make_free(TimestampTz *times, int count)
Construct a timestamp set from the array of timestamps and free the array after the creation...
Definition: timestampset.c:129
TimestampSet * timestampset_copy(const TimestampSet *ts)
Returns a copy of the timestamp set.
Definition: timestampset.c:145
char * timestampset_to_string(const TimestampSet *ts)
Returns the string representation of the timestamp set value.
Definition: timestampset.c:223
void timestampset_to_period_internal(Period *p, const TimestampSet *ts)
Returns the bounding period on which the timestamp set value is defined (internal function) ...
Definition: timestampset.c:332