Header And Logo

PostgreSQL
| The world's most advanced open source database.

pgtypes_timestamp.h

Go to the documentation of this file.
00001 /* src/interfaces/ecpg/include/pgtypes_timestamp.h */
00002 
00003 #ifndef PGTYPES_TIMESTAMP
00004 #define PGTYPES_TIMESTAMP
00005 
00006 /* pgtypes_interval.h includes ecpg_config.h */
00007 #include <pgtypes_interval.h>
00008 
00009 #ifdef HAVE_INT64_TIMESTAMP
00010 typedef int64 timestamp;
00011 typedef int64 TimestampTz;
00012 #else
00013 typedef double timestamp;
00014 typedef double TimestampTz;
00015 #endif
00016 
00017 #ifdef __cplusplus
00018 extern      "C"
00019 {
00020 #endif
00021 
00022 extern timestamp PGTYPEStimestamp_from_asc(char *, char **);
00023 extern char *PGTYPEStimestamp_to_asc(timestamp);
00024 extern int  PGTYPEStimestamp_sub(timestamp *, timestamp *, interval *);
00025 extern int  PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, const char *);
00026 extern void PGTYPEStimestamp_current(timestamp *);
00027 extern int  PGTYPEStimestamp_defmt_asc(char *, const char *, timestamp *);
00028 extern int  PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout);
00029 extern int  PGTYPEStimestamp_sub_interval(timestamp * tin, interval * span, timestamp * tout);
00030 
00031 #ifdef __cplusplus
00032 }
00033 #endif
00034 
00035 #endif   /* PGTYPES_TIMESTAMP */