MobilityDB 1.3
Loading...
Searching...
No Matches
postgres_ext_defs.in.h
Go to the documentation of this file.
1#ifndef POSTGRES_H
2#define POSTGRES_H
3
4#define DatumGetPointer(X) ((Pointer) (X))
5
6typedef char *Pointer;
7typedef uintptr_t Datum;
8
9typedef signed char int8;
10typedef signed short int16;
11typedef signed int int32;
12typedef long int int64;
13
14typedef unsigned char uint8;
15typedef unsigned short uint16;
16typedef unsigned int uint32;
17typedef unsigned long int uint64;
18
19typedef int32 DateADT;
20typedef int64 TimeADT;
24typedef int32 fsec_t; /* fractional seconds (in microseconds) */
25
26typedef struct
27{
28 TimeOffset time; /* all time units other than days, months and years */
29 int32 day; /* days, after time for alignment */
30 int32 month; /* months and years, after time for alignment */
31} Interval;
32
33typedef struct varlena
34{
35 char vl_len_[4]; /* Do not touch this field directly! */
36 char vl_dat[]; /* Data content is here */
38
39typedef varlena text;
40typedef struct varlena bytea;
41
42/* The following functions have the same name as external PostgreSQL functions */
43
44extern DateADT date_in(const char *str);
45extern char *date_out(DateADT d);
46extern int interval_cmp(const Interval *interv1, const Interval *interv2);
47extern Interval *interval_in(const char *str, int32 typmod);
48extern char *interval_out(const Interval *interv);
49extern TimeADT time_in(const char *str, int32 typmod);
50extern char *time_out(TimeADT t);
51extern Timestamp timestamp_in(const char *str, int32 typmod);
52extern char *timestamp_out(Timestamp t);
53extern TimestampTz timestamptz_in(const char *str, int32 typmod);
54extern char *timestamptz_out(TimestampTz t);
55
56#endif /* POSTGRES_H */
TimeADT time_in(const char *str, int32 typmod)
Return a time from its string representation.
Definition: postgres_types.c:1079
char * interval_out(const Interval *interv)
Return the string representation of an interval.
Definition: postgres_types.c:1801
char * timestamptz_out(TimestampTz t)
Return the string representation of a timestamp with timezone.
Definition: postgres_types.c:1424
TimestampTz timestamptz_in(const char *str, int32 typmod)
Return the string representation of a timestamp with time zone.
Definition: postgres_types.c:1346
int interval_cmp(const Interval *interv1, const Interval *interv2)
Return the comparison of two intervals.
Definition: postgres_types.c:2217
Timestamp timestamp_in(const char *str, int32 typmod)
Return a timestamp without time zone from its string representation.
Definition: postgres_types.c:1325
char * date_out(DateADT d)
Return the string representation of a date.
Definition: postgres_types.c:711
char * timestamp_out(Timestamp t)
Return the string representation of a timestamp without timezone.
Definition: postgres_types.c:1407
char * time_out(TimeADT t)
Return the string representation of a time.
Definition: postgres_types.c:1122
Interval * interval_in(const char *str, int32 typmod)
Return an interval from its string representation.
Definition: postgres_types.c:1654
DateADT date_in(const char *str)
Return a date from its string representation.
Definition: postgres_types.c:608
unsigned short uint16
Definition: postgres_ext_defs.in.h:15
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 char int8
Definition: postgres_ext_defs.in.h:9
int32 fsec_t
Definition: postgres_ext_defs.in.h:24
signed short int16
Definition: postgres_ext_defs.in.h:10
struct varlena varlena
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
signed int int32
Definition: postgres_ext_defs.in.h:11
char * Pointer
Definition: postgres_ext_defs.in.h:6
int32 DateADT
Definition: postgres_ext_defs.in.h:19
int64 TimeADT
Definition: postgres_ext_defs.in.h:20
unsigned char uint8
Definition: postgres_ext_defs.in.h:14
varlena text
Definition: postgres_ext_defs.in.h:39
unsigned long int uint64
Definition: postgres_ext_defs.in.h:17
int64 TimeOffset
Definition: postgres_ext_defs.in.h:23
long int int64
Definition: postgres_ext_defs.in.h:12
int32 day
Definition: postgres_ext_defs.in.h:29
int32 month
Definition: postgres_ext_defs.in.h:30
TimeOffset time
Definition: postgres_ext_defs.in.h:28
Definition: postgres_ext_defs.in.h:27
char vl_len_[4]
Definition: postgres_ext_defs.in.h:35
char vl_dat[]
Definition: postgres_ext_defs.in.h:36
Definition: postgres_ext_defs.in.h:34
int64 TimeOffset
Definition: timestamp_def.h:42