PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
extern.h
Go to the documentation of this file.
1 /* src/interfaces/ecpg/pgtypeslib/extern.h */
2 
3 #ifndef __PGTYPES_COMMON_H__
4 #define __PGTYPES_COMMON_H__
5 
6 #include "pgtypes_error.h"
7 
8 /* These are the constants that decide which printf() format we'll use in
9  * order to get a string representation of the value */
10 #define PGTYPES_TYPE_NOTHING 0
11 #define PGTYPES_TYPE_STRING_MALLOCED 1
12 #define PGTYPES_TYPE_STRING_CONSTANT 2
13 #define PGTYPES_TYPE_CHAR 3
14 #define PGTYPES_TYPE_DOUBLE_NF 4 /* no fractional part */
15 #define PGTYPES_TYPE_INT64 5
16 #define PGTYPES_TYPE_UINT 6
17 #define PGTYPES_TYPE_UINT_2_LZ 7 /* 2 digits, pad with leading
18  * zero */
19 #define PGTYPES_TYPE_UINT_2_LS 8 /* 2 digits, pad with leading
20  * space */
21 #define PGTYPES_TYPE_UINT_3_LZ 9
22 #define PGTYPES_TYPE_UINT_4_LZ 10
23 #define PGTYPES_TYPE_UINT_LONG 11
24 
25 #define PGTYPES_FMT_NUM_MAX_DIGITS 40
26 
28 {
29  char *str_val;
30  unsigned int uint_val;
31  char char_val;
32  unsigned long int luint_val;
33  double double_val;
34  int64 int64_val;
35 };
36 
37 int pgtypes_fmt_replace(union un_fmt_comb, int, char **, int *);
38 
39 char *pgtypes_alloc(long);
40 char *pgtypes_strdup(const char *);
41 
42 #ifndef bool
43 #define bool char
44 #endif /* ndef bool */
45 
46 #ifndef FALSE
47 #define FALSE 0
48 #endif /* FALSE */
49 
50 #ifndef TRUE
51 #define TRUE 1
52 #endif /* TRUE */
53 
54 #endif /* __PGTYPES_COMMON_H__ */
unsigned long int luint_val
Definition: extern.h:32
int pgtypes_fmt_replace(union un_fmt_comb, int, char **, int *)
Definition: common.c:29
char * pgtypes_alloc(long)
Definition: common.c:9
double double_val
Definition: extern.h:33
char char_val
Definition: extern.h:31
int64 int64_val
Definition: extern.h:34
char * str_val
Definition: extern.h:29
char * pgtypes_strdup(const char *)
Definition: common.c:19
unsigned int uint_val
Definition: extern.h:30