PostgreSQL Source Code  git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pgtypeslib_extern.h
Go to the documentation of this file.
1 /* src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h */
2 
3 #ifndef _ECPG_PGTYPESLIB_EXTERN_H
4 #define _ECPG_PGTYPESLIB_EXTERN_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 
26 union un_fmt_comb
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 replace_val,
37  int replace_type, char **output,
38  int *pstr_len);
39 
40 char *pgtypes_alloc(long size);
41 char *pgtypes_strdup(const char *str);
42 
43 #endif /* _ECPG_PGTYPESLIB_EXTERN_H */
const char * str
FILE * output
char * pgtypes_strdup(const char *str)
Definition: common.c:20
int pgtypes_fmt_replace(union un_fmt_comb replace_val, int replace_type, char **output, int *pstr_len)
Definition: common.c:30
char * pgtypes_alloc(long size)
Definition: common.c:10
static pg_noinline void Size size
Definition: slab.c:607
unsigned int uint_val
unsigned long int luint_val