1/* src/interfaces/ecpg/include/pgtypes_timestamp.h */
2
3#ifndef PGTYPES_TIMESTAMP
4#define PGTYPES_TIMESTAMP
5
6#include <pgtypes.h>
7/* pgtypes_interval.h includes ecpg_config.h */
8#include <pgtypes_interval.h>
9
10typedef int64 timestamp;
11typedef int64 TimestampTz;
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif
17
18extern timestamp PGTYPEStimestamp_from_asc(char *, char **);
19extern char *PGTYPEStimestamp_to_asc(timestamp);
20extern int PGTYPEStimestamp_sub(timestamp *, timestamp *, interval *);
21extern int PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, const char *);
22extern void PGTYPEStimestamp_current(timestamp *);
23extern int PGTYPEStimestamp_defmt_asc(const char *, const char *, timestamp *);
24extern int PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout);
25extern int PGTYPEStimestamp_sub_interval(timestamp * tin, interval * span, timestamp * tout);
26
27#ifdef __cplusplus
28}
29#endif
30
31#endif /* PGTYPES_TIMESTAMP */
32