PostgreSQL Source Code
git master
|
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "ecpg_config.h"
#include "sqlda-native.h"
#include <pgtypes.h>
Go to the source code of this file.
Data Structures | |
struct | numeric |
struct | decimal |
Macros | |
#define | ECPGdebug(X, Y) ECPGdebug((X)+100,(Y)) |
#define | ECPG_SQLDA_H |
#define | PGTYPES_NUMERIC |
#define | NUMERIC_POS 0x0000 |
#define | NUMERIC_NEG 0x4000 |
#define | NUMERIC_NAN 0xC000 |
#define | NUMERIC_NULL 0xF000 |
#define | NUMERIC_MAX_PRECISION 1000 |
#define | NUMERIC_MAX_DISPLAY_SCALE NUMERIC_MAX_PRECISION |
#define | NUMERIC_MIN_DISPLAY_SCALE 0 |
#define | NUMERIC_MIN_SIG_DIGITS 16 |
#define | DECSIZE 30 |
Typedefs | |
typedef struct sqlvar_struct | sqlvar_t |
typedef struct sqlda_struct | sqlda_t |
typedef unsigned char | NumericDigit |
Variables | |
sqlda_t * | inp_sqlda |
sqlda_t * | outp_sqlda |
sqlda_t * | outp_sqlda1 |
#define DECSIZE 30 |
Definition at line 64 of file sql-sqlda.c.
#define ECPG_SQLDA_H |
Definition at line 28 of file sql-sqlda.c.
#define ECPGdebug | ( | X, | |
Y | |||
) | ECPGdebug((X)+100,(Y)) |
Definition at line 7 of file sql-sqlda.c.
#define NUMERIC_MAX_DISPLAY_SCALE NUMERIC_MAX_PRECISION |
Definition at line 60 of file sql-sqlda.c.
#define NUMERIC_MAX_PRECISION 1000 |
Definition at line 59 of file sql-sqlda.c.
#define NUMERIC_MIN_DISPLAY_SCALE 0 |
Definition at line 61 of file sql-sqlda.c.
#define NUMERIC_MIN_SIG_DIGITS 16 |
Definition at line 62 of file sql-sqlda.c.
#define NUMERIC_NAN 0xC000 |
Definition at line 57 of file sql-sqlda.c.
#define NUMERIC_NEG 0x4000 |
Definition at line 56 of file sql-sqlda.c.
#define NUMERIC_NULL 0xF000 |
Definition at line 58 of file sql-sqlda.c.
#define NUMERIC_POS 0x0000 |
Definition at line 55 of file sql-sqlda.c.
#define PGTYPES_NUMERIC |
Definition at line 51 of file sql-sqlda.c.
typedef unsigned char NumericDigit |
Definition at line 66 of file sql-sqlda.c.
typedef struct sqlda_struct sqlda_t |
Definition at line 1 of file sql-sqlda.c.
typedef struct sqlvar_struct sqlvar_t |
Definition at line 1 of file sql-sqlda.c.
|
static |
Definition at line 131 of file sql-sqlda.c.
References sqlname::data, ECPGt_char, ECPGt_double, ECPGt_int, ECPGt_long, ECPGt_long_long, ECPGt_numeric, i, PGTYPESchar_free(), PGTYPESnumeric_to_asc(), printf, sqlda_struct::sqld, sqlvar_struct::sqldata, sqlvar_struct::sqlind, sqlvar_struct::sqlname, sqlvar_struct::sqltype, sqlda_struct::sqlvar, and val.
Referenced by main().
int main | ( | void | ) |
Definition at line 183 of file sql-sqlda.c.
References sqlda_struct::desc_next, dump_sqlda(), ECPG_NOT_FOUND, ECPGconnect(), ECPGdeallocate(), ECPGdebug, ECPGdisconnect(), ECPGdo(), ECPGprepare(), ECPGprepared_statement(), ECPGst_execute, ECPGst_normal, ECPGt_char_variable, ECPGt_EOIT, ECPGt_EORT, ECPGt_int, ECPGt_NO_INDICATOR, ECPGt_sqlda, ECPGtrans(), exit(), free, inp_sqlda, malloc, outp_sqlda, outp_sqlda1, printf, sqlca, sqlvar_struct::sqldata, sqlda_struct::sqln, sqlvar_struct::sqltype, and sqlda_struct::sqlvar.
void PGTYPESdecimal_free | ( | decimal * | var | ) |
decimal* PGTYPESdecimal_new | ( | void | ) |
Definition at line 59 of file numeric.c.
Definition at line 1388 of file numeric.c.
Referenced by numericvar_to_double(), PGTYPESnumeric_from_double(), and PGTYPESnumeric_to_asc().
Definition at line 1053 of file numeric.c.
void PGTYPESnumeric_free | ( | numeric * | var | ) |
Definition at line 385 of file numeric.c.
Referenced by numericvar_to_double(), PGTYPESnumeric_from_asc(), PGTYPESnumeric_from_double(), and PGTYPESnumeric_to_asc().
numeric* PGTYPESnumeric_from_asc | ( | char * | str, |
char ** | endptr | ||
) |
Definition at line 321 of file numeric.c.
Referenced by PGTYPESnumeric_from_double().
int PGTYPESnumeric_from_double | ( | double | d, |
numeric * | dst | ||
) |
Definition at line 1411 of file numeric.c.
int PGTYPESnumeric_from_int | ( | signed int | int_val, |
numeric * | var | ||
) |
Definition at line 1309 of file numeric.c.
int PGTYPESnumeric_from_long | ( | signed long int | long_val, |
numeric * | var | ||
) |
numeric* PGTYPESnumeric_new | ( | void | ) |
Definition at line 42 of file numeric.c.
Referenced by numericvar_to_double(), and PGTYPESnumeric_to_asc().
char* PGTYPESnumeric_to_asc | ( | numeric * | num, |
int | dscale | ||
) |
int PGTYPESnumeric_to_double | ( | numeric * | nv, |
double * | dp | ||
) |
Definition at line 1483 of file numeric.c.
int PGTYPESnumeric_to_long | ( | numeric * | nv, |
long * | lp | ||
) |
Definition at line 1518 of file numeric.c.
Referenced by PGTYPESnumeric_to_int().
sqlda_t* inp_sqlda |
Definition at line 128 of file sql-sqlda.c.
Referenced by main().
sqlda_t * outp_sqlda |
Definition at line 128 of file sql-sqlda.c.
Referenced by main().
sqlda_t * outp_sqlda1 |
Definition at line 128 of file sql-sqlda.c.
Referenced by main().