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 zero */
18 #define PGTYPES_TYPE_UINT_2_LS 8 /* 2 digits, pad with leading
19  * space */
20 #define PGTYPES_TYPE_UINT_3_LZ 9
21 #define PGTYPES_TYPE_UINT_4_LZ 10
22 #define PGTYPES_TYPE_UINT_LONG 11
23 
24 #define PGTYPES_FMT_NUM_MAX_DIGITS 40
25 
27 {
28  char *str_val;
29  unsigned int uint_val;
30  char char_val;
31  unsigned long int luint_val;
32  double double_val;
33  int64 int64_val;
34 };
35 
36 int pgtypes_fmt_replace(union un_fmt_comb, int, char **, int *);
37 
38 char *pgtypes_alloc(long);
39 char *pgtypes_strdup(const char *);
40 
41 #ifndef bool
42 #define bool char
43 #endif /* ndef bool */
44 
45 #ifndef FALSE
46 #define FALSE 0
47 #endif /* FALSE */
48 
49 #ifndef TRUE
50 #define TRUE 1
51 #endif /* TRUE */
52 
53 #endif /* __PGTYPES_COMMON_H__ */
unsigned long int luint_val
Definition: extern.h:31
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:32
char char_val
Definition: extern.h:30
int64 int64_val
Definition: extern.h:33
char * str_val
Definition: extern.h:28
char * pgtypes_strdup(const char *)
Definition: common.c:19
unsigned int uint_val
Definition: extern.h:29