36#ifndef POSTGRES_TYPES_H
37#define POSTGRES_TYPES_H
48#if POSTGRESQL_VERSION_NUMBER < 170000
53#define INTERVAL_NOBEGIN(i) \
55 (i)->time = PG_INT64_MIN; \
56 (i)->day = PG_INT32_MIN; \
57 (i)->month = PG_INT32_MIN; \
60#define INTERVAL_IS_NOBEGIN(i) \
61 ((i)->month == PG_INT32_MIN && (i)->day == PG_INT32_MIN && (i)->time == PG_INT64_MIN)
63#define INTERVAL_NOEND(i) \
65 (i)->time = PG_INT64_MAX; \
66 (i)->day = PG_INT32_MAX; \
67 (i)->month = PG_INT32_MAX; \
70#define INTERVAL_IS_NOEND(i) \
71 ((i)->month == PG_INT32_MAX && (i)->day == PG_INT32_MAX && (i)->time == PG_INT64_MAX)
73#define INTERVAL_NOT_FINITE(i) (INTERVAL_IS_NOBEGIN(i) || INTERVAL_IS_NOEND(i))
89 const char *orig_string);
double float8
Definition: c.h:581
int64 Timestamp
Definition: postgres_ext_defs.in.h:21
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
unsigned int uint32
Definition: postgres_ext_defs.in.h:16
signed int int32
Definition: postgres_ext_defs.in.h:11
int32 DateADT
Definition: postgres_ext_defs.in.h:19
unsigned long int uint64
Definition: postgres_ext_defs.in.h:17
long int int64
Definition: postgres_ext_defs.in.h:12
uint32 hash_bytes_uint32(uint32 k)
Definition: hashfn.c:610
float8 float8_in(const char *num, const char *type_name, const char *orig_string)
Definition: postgres_types.c:447
float8 pg_datan2(float8 arg1, float8 arg2)
Return the arctan of two doubles (radians)
Definition: postgres_types.c:571
char * pg_timestamp_out(Timestamp t)
Definition: postgres_types.c:1412
float8 pg_datan(float8 arg1)
Return the arctan of a double (radians)
Definition: postgres_types.c:546
uint32 pg_hashfloat8(float8 key)
Get the 32-bit hash value of an float64 value.
Definition: postgres_types.c:2544
float8 pg_dcos(float8 arg1)
Return the cosine of arg1 (radians)
Definition: postgres_types.c:505
DateADT pg_date_in(const char *str)
Definition: postgres_types.c:614
float8 pg_dsin(float8 arg1)
Return the sine of arg1 (radians)
Definition: postgres_types.c:477
int64 int8_in(const char *str)
Return an int8 from a string.
Definition: postgres_types.c:275
uint64 pg_hashfloat8extended(float8 key, uint64 seed)
Get the 64-bit hash value of a float64 value.
Definition: postgres_types.c:2568
int32 int4_in(const char *str)
Return an int4 from a string.
Definition: postgres_types.c:243
uint64 pg_hashtextextended(text *key, uint64 seed)
Get the 32-bit hash value of an text value.
Definition: postgres_types.c:2597
Interval * pg_interval_justify_hours(const Interval *span)
Add an interval to a timestamp data type.
Definition: postgres_types.c:2009
uint32 pg_hashtext(text *key)
Get the 32-bit hash value of an text value.
Definition: postgres_types.c:2585
uint64 hash_bytes_uint32_extended(uint32 k, uint64 seed)
Definition: hashfn.c:631
char * pg_interval_out(const Interval *interv)
Definition: postgres_types.c:1806
int pg_interval_cmp(const Interval *interv1, const Interval *interv2)
Definition: postgres_types.c:2223
TimestampTz pg_timestamptz_in(const char *str, int32 prec)
Definition: postgres_types.c:1351
char * int8_out(int64 val)
Return a string from an int8.
Definition: postgres_types.c:294
char * pg_date_out(DateADT d)
Definition: postgres_types.c:717
uint32 pg_hashint8(int64 val)
Get the 32-bit hash value of an int64 value.
Definition: postgres_types.c:2509
uint64 pg_hashint8extended(int64 val, uint64 seed)
Get the 64-bit hash value of an int64 value.
Definition: postgres_types.c:2530
Timestamp pg_timestamp_in(const char *str, int32 typmod)
Definition: postgres_types.c:1330
char * pg_timestamptz_out(TimestampTz t)
Definition: postgres_types.c:1429
char * int4_out(int32 val)
Return a string from an int4.
Definition: postgres_types.c:255
Interval * pg_interval_in(const char *str, int32 prec)
Definition: postgres_types.c:1659
char * float8_out(double num, int maxdd)
Definition: postgres_types.c:462
void interval_negate(const Interval *interval, Interval *result)
Negate an interval.
Definition: postgres_types.c:2064
Definition: postgres_ext_defs.in.h:27
Definition: postgres_ext_defs.in.h:34