PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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/*
9 * These are the constants that decide which printf() format we'll use in
10 * order to get a string representation of the value
11 */
12#define PGTYPES_TYPE_NOTHING 0
13#define PGTYPES_TYPE_STRING_MALLOCED 1
14#define PGTYPES_TYPE_STRING_CONSTANT 2
15#define PGTYPES_TYPE_CHAR 3
16#define PGTYPES_TYPE_DOUBLE_NF 4 /* no fractional part */
17#define PGTYPES_TYPE_INT64 5
18#define PGTYPES_TYPE_UINT 6
19#define PGTYPES_TYPE_UINT_2_LZ 7 /* 2 digits, pad with leading zero */
20#define PGTYPES_TYPE_UINT_2_LS 8 /* 2 digits, pad with leading
21 * space */
22#define PGTYPES_TYPE_UINT_3_LZ 9
23#define PGTYPES_TYPE_UINT_4_LZ 10
24#define PGTYPES_TYPE_UINT_LONG 11
26#define PGTYPES_FMT_NUM_MAX_DIGITS 40
28union un_fmt_comb
30 char *str_val;
31 unsigned int uint_val;
33 unsigned long int luint_val;
34 double double_val;
36};
37
39 int replace_type, char **output,
40 int *pstr_len);
41
42char *pgtypes_alloc(long size);
43char *pgtypes_strdup(const char *str);
44
45#endif /* _ECPG_PGTYPESLIB_EXTERN_H */
int64_t int64
Definition c.h:621
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 int fb(int x)
unsigned int uint_val
unsigned long int luint_val