Debian Codegraph @

src/interfaces/ecpg/include/pgtypes_interval.h

raw
1 /* src/interfaces/ecpg/include/pgtypes_interval.h */
2
3 #ifndef PGTYPES_INTERVAL
4 #define PGTYPES_INTERVAL
5
6 #include <stdint.h>
7
8 #include <ecpg_config.h>
9 #include <pgtypes.h>
10
11 #ifndef C_H
12
13 typedef int64_t int64;
14
15 #define HAVE_INT64_TIMESTAMP
16
17 #endif /* C_H */
18
19 typedef struct
20 {
21 int64 time; /* all time units other than months and years */
22 long month; /* months and years, after time for alignment */
23 } interval;
24
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29
30 extern interval * PGTYPESinterval_new(void);
31 extern void PGTYPESinterval_free(interval * intvl);
32 extern interval * PGTYPESinterval_from_asc(char *str, char **endptr);
33 extern char *PGTYPESinterval_to_asc(interval * span);
34 extern int PGTYPESinterval_copy(interval * intvlsrc, interval * intvldest);
35
36 #ifdef __cplusplus
37 }
38 #endif
39
40 #endif /* PGTYPES_INTERVAL */