PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pgtypes_interval.h
Go to the documentation of this file.
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
13typedef int64_t int64;
14
15#define HAVE_INT64_TIMESTAMP
16
17#endif /* C_H */
18
19typedef 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
26extern "C"
27{
28#endif
29
30extern interval * PGTYPESinterval_new(void);
31extern void PGTYPESinterval_free(interval * intvl);
32extern interval * PGTYPESinterval_from_asc(char *str, char **endptr);
33extern char *PGTYPESinterval_to_asc(interval * span);
34extern int PGTYPESinterval_copy(interval * intvlsrc, interval * intvldest);
35
36#ifdef __cplusplus
37}
38#endif
39
40#endif /* PGTYPES_INTERVAL */
int64_t int64
Definition: c.h:485
const char * str
interval * PGTYPESinterval_new(void)
Definition: interval.c:987
void PGTYPESinterval_free(interval *intvl)
Definition: interval.c:997
int PGTYPESinterval_copy(interval *intvlsrc, interval *intvldest)
Definition: interval.c:1082
int64_t int64
interval * PGTYPESinterval_from_asc(char *str, char **endptr)
Definition: interval.c:1003
char * PGTYPESinterval_to_asc(interval *span)
Definition: interval.c:1062