36#ifndef POSTGRES_TYPES_H
37#define POSTGRES_TYPES_H
44#include <utils/date.h>
45#include <utils/timestamp.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))
88extern float8
float8_in(
const char *num,
const char *type_name,
89 const char *orig_string);
91extern float8
pg_dsin(float8 arg1);
92extern float8
pg_dcos(float8 arg1);
94extern float8
pg_datan2(float8 arg1, float8 arg2);
unsigned int uint32
Definition: postgres_ext_defs.in.h:16
signed int int32
Definition: postgres_ext_defs.in.h:11
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)
float8 float8_in(const char *num, const char *type_name, const char *orig_string)
Definition: postgres_types.c:448
float8 pg_datan2(float8 arg1, float8 arg2)
Return the arctan of two doubles (radians)
Definition: postgres_types.c:571
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:2557
float8 pg_dcos(float8 arg1)
Return the cosine of arg1 (radians)
Definition: postgres_types.c:505
Interval * interval_negate(const Interval *interval)
Negate an interval.
Definition: postgres_types.c:2067
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:276
uint64 pg_hashfloat8extended(float8 key, uint64 seed)
Get the 64-bit hash value of a float64 value.
Definition: postgres_types.c:2581
int32 int4_in(const char *str)
Return an int4 from a string.
Definition: postgres_types.c:244
uint64 pg_hashtextextended(text *key, uint64 seed)
Get the 32-bit hash value of an text value.
Definition: postgres_types.c:2610
Interval * pg_interval_justify_hours(const Interval *span)
Add an interval to a timestamp data type.
Definition: postgres_types.c:2012
uint32 pg_hashtext(text *key)
Get the 32-bit hash value of an text value.
Definition: postgres_types.c:2598
uint64 hash_bytes_uint32_extended(uint32 k, uint64 seed)
char * int8_out(int64 val)
Return a string from an int8.
Definition: postgres_types.c:295
uint32 pg_hashint8(int64 val)
Get the 32-bit hash value of an int64 value.
Definition: postgres_types.c:2522
uint64 pg_hashint8extended(int64 val, uint64 seed)
Get the 64-bit hash value of an int64 value.
Definition: postgres_types.c:2543
char * int4_out(int32 val)
Return a string from an int4.
Definition: postgres_types.c:256
char * float8_out(double num, int maxdd)
Definition: postgres_types.c:463
Definition: postgres_ext_defs.in.h:27
Definition: postgres_ext_defs.in.h:34