PostgreSQL Source Code git master
pgtypes_timestamp.h
Go to the documentation of this file.
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
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif
17
18extern timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr);
19extern char *PGTYPEStimestamp_to_asc(timestamp tstamp);
20extern int PGTYPEStimestamp_sub(timestamp * ts1, timestamp * ts2, interval * iv);
21extern int PGTYPEStimestamp_fmt_asc(timestamp * ts, char *output, int str_len, const char *fmtstr);
22extern void PGTYPEStimestamp_current(timestamp * ts);
23extern int PGTYPEStimestamp_defmt_asc(const char *str, const char *fmt, timestamp * d);
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 */
int64_t int64
Definition: c.h:485
const char * str
FILE * output
static void const char * fmt
int PGTYPEStimestamp_sub_interval(timestamp *tin, interval *span, timestamp *tout)
Definition: timestamp.c:913
int64 TimestampTz
timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr)
Definition: timestamp.c:202
int PGTYPEStimestamp_sub(timestamp *ts1, timestamp *ts2, interval *iv)
Definition: timestamp.c:793
int64 timestamp
int PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tout)
Definition: timestamp.c:858
char * PGTYPEStimestamp_to_asc(timestamp tstamp)
Definition: timestamp.c:268
void PGTYPEStimestamp_current(timestamp *ts)
Definition: timestamp.c:290
int PGTYPEStimestamp_fmt_asc(timestamp *ts, char *output, int str_len, const char *fmtstr)
Definition: timestamp.c:778
int PGTYPEStimestamp_defmt_asc(const char *str, const char *fmt, timestamp *d)
Definition: timestamp.c:806
static void fmtstr(const char *value, int leftjust, int minlen, int maxwidth, int pointflag, PrintfTarget *target)
Definition: snprintf.c:1003