MobilityDB 1.1
Macros | Functions | Variables
pg_types.c File Reference
#include "general/pg_types.h"
#include <float.h>
#include <math.h>
#include <limits.h>
#include <postgres.h>
#include <common/int128.h>
#include <utils/datetime.h>
#include <access/hash.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/type_util.h"
Include dependency graph for pg_types.c:

Macros

#define DATEORDER_DMY   1
 
#define DATEORDER_MDY   2
 
#define DATEORDER_YMD   0
 
#define final(a, b, c)
 
#define INTSTYLE_ISO_8601   3
 
#define INTSTYLE_POSTGRES   0
 
#define INTSTYLE_POSTGRES_VERBOSE   1
 
#define INTSTYLE_SQL_STANDARD   2
 
#define mix(a, b, c)
 
#define rot(x, k)   (((x)<<(k)) | ((x)>>(32-(k))))
 
#define SAMESIGN(a, b)   (((a) < 0) == ((b) < 0))
 
#define USE_GERMAN_DATES   3
 
#define USE_ISO_DATES   1
 
#define USE_POSTGRES_DATES   0
 Functions for base and time types borrowed from PostgreSQL. More...
 
#define USE_SQL_DATES   2
 
#define USE_XSD_DATES   4
 

Functions

static void AdjustIntervalForTypmod (Interval *interval, int32 typmod)
 
void AdjustTimeForTypmod (TimeADT *time, int32 typmod)
 
void AdjustTimestampForTypmod (Timestamp *time, int32 typmod)
 
bool AdjustTimestampForTypmodError (Timestamp *time, int32 typmod, bool *error)
 
uint32 hash_bytes_uint32 (uint32 k)
 
uint64 hash_bytes_uint32_extended (uint32 k, uint64 seed)
 
static INT128 interval_cmp_value (const Interval *interval)
 
float8 pg_datan (float8 arg1)
 Return the arctan of arg1 (radians) More...
 
float8 pg_datan2 (float8 arg1, float8 arg2)
 Return the arctan of arg1/arg2 (radians) More...
 
DateADT pg_date_in (const char *str)
 Convert a string to a date in internal date format. More...
 
char * pg_date_out (DateADT date)
 Convert a date in internal date format to a string. More...
 
float8 pg_dcos (float8 arg1)
 Return the cosine of arg1 (radians) More...
 
float8 pg_dsin (float8 arg1)
 Return the sine of arg1 (radians) More...
 
uint32 pg_hashfloat8 (float8 key)
 Get the 32-bit hash value of an float64 value. More...
 
uint64 pg_hashfloat8extended (float8 key, uint64 seed)
 Get the 64-bit hash value of a float64 value. More...
 
uint32 pg_hashint8 (int64 val)
 Get the 32-bit hash value of an int64 value. More...
 
uint64 pg_hashint8extended (int64 val, uint64 seed)
 Get the 64-bit hash value of an int64 value. More...
 
uint32 pg_hashtext (text *key)
 Get the 32-bit hash value of an text value. More...
 
uint64 pg_hashtextextended (text *key, uint64 seed)
 Get the 32-bit hash value of an text value. More...
 
int pg_interval_cmp (const Interval *interval1, const Interval *interval2)
 Compare the two intervals. More...
 
Intervalpg_interval_in (const char *str, int32 typmod)
 Convert a string to an interval. More...
 
Intervalpg_interval_justify_hours (const Interval *span)
 Add an interval to a timestamp data type. More...
 
Intervalpg_interval_make (int32 years, int32 months, int32 weeks, int32 days, int32 hours, int32 mins, double secs)
 Interval constructor. More...
 
Intervalpg_interval_mul (const Interval *span, double factor)
 Multiply an interval by a scalar. More...
 
char * pg_interval_out (const Interval *span)
 Convert a time span to external form. More...
 
Intervalpg_interval_pl (const Interval *span1, const Interval *span2)
 Add an interval to a timestamp data type. More...
 
TimeADT pg_time_in (const char *str, int32 typmod)
 Convert a string to a time. More...
 
char * pg_time_out (TimeADT time)
 Convert a time to a string. More...
 
Timestamp pg_timestamp_in (const char *str, int32 typmod)
 Convert a string to a timestamp without time zone. More...
 
Intervalpg_timestamp_mi (TimestampTz dt1, TimestampTz dt2)
 Compute the difference of two timestamps. More...
 
TimestampTz pg_timestamp_mi_interval (TimestampTz timestamp, const Interval *span)
 Add an interval to a timestamp data type. More...
 
char * pg_timestamp_out (Timestamp dt)
 Convert a timestamp without timezone to a string. More...
 
TimestampTz pg_timestamp_pl_interval (TimestampTz timestamp, const Interval *span)
 Add an interval to a timestamp data type. More...
 
TimestampTz pg_timestamptz_in (const char *str, int32 typmod)
 Convert a string to a timestamp with time zone. More...
 
char * pg_timestamptz_out (TimestampTz dt)
 Convert a timestamp with timezone to a string. More...
 
TimestampTz timestamp_in_common (const char *str, int32 typmod, bool withtz)
 Convert a string to a either timestamp or a timestamp with timezone. More...
 
char * timestamp_out_common (TimestampTz dt, bool withtz)
 Convert either a timestamp or a timestamp to a string. More...
 

Variables

int DateOrder = DATEORDER_MDY
 
int DateStyle = USE_ISO_DATES
 
int IntervalStyle = INTSTYLE_POSTGRES