PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include "catalog/pg_type_d.h"
#include "decimal.h"
#include "ecpg-pthread-win32.h"
#include "ecpgerrno.h"
#include "ecpglib.h"
#include "ecpglib_extern.h"
#include "ecpgtype.h"
#include "sqlca.h"
#include "sqlda-compat.h"
#include "sqlda-native.h"
Go to the source code of this file.
Macros | |
#define | POSTGRES_ECPG_INTERNAL |
Functions | |
static void | ecpg_sqlda_align_add_size (long offset, int alignment, int size, long *current, long *next) |
static long | sqlda_compat_empty_size (const PGresult *res) |
static long | sqlda_common_total_size (const PGresult *res, int row, enum COMPAT_MODE compat, long offset) |
static long | sqlda_compat_total_size (const PGresult *res, int row, enum COMPAT_MODE compat) |
static long | sqlda_native_empty_size (const PGresult *res) |
static long | sqlda_native_total_size (const PGresult *res, int row, enum COMPAT_MODE compat) |
struct sqlda_compat * | ecpg_build_compat_sqlda (int line, PGresult *res, int row, enum COMPAT_MODE compat) |
void | ecpg_set_compat_sqlda (int lineno, struct sqlda_compat **_sqlda, const PGresult *res, int row, enum COMPAT_MODE compat) |
struct sqlda_struct * | ecpg_build_native_sqlda (int line, PGresult *res, int row, enum COMPAT_MODE compat) |
void | ecpg_set_native_sqlda (int lineno, struct sqlda_struct **_sqlda, const PGresult *res, int row, enum COMPAT_MODE compat) |
Variables | |
static int16 | value_is_null = -1 |
static int16 | value_is_not_null = 0 |
struct sqlda_compat* ecpg_build_compat_sqlda | ( | int | line, |
PGresult * | res, | ||
int | row, | ||
enum COMPAT_MODE | compat | ||
) |
Definition at line 205 of file sqlda.c.
References compat, sqlda_compat::desc_occ, ecpg_alloc(), ecpg_log(), i, PQfname(), PQfsize(), PQftype(), PQnfields(), res, size, sqlda_compat::sqld, sqlda_compat_total_size(), sqlda_dynamic_type(), sqlvar_compat::sqlname, sqlvar_compat::sqltype, sqlvar_compat::sqltypelen, sqlda_compat::sqlvar, and sqlvar_compat::sqlxid.
Referenced by ecpg_process_output(), and ECPGdescribe().
struct sqlda_struct* ecpg_build_native_sqlda | ( | int | line, |
PGresult * | res, | ||
int | row, | ||
enum COMPAT_MODE | compat | ||
) |
Definition at line 412 of file sqlda.c.
References compat, sqlname::data, ecpg_alloc(), ecpg_log(), i, sqlname::length, PQfname(), PQftype(), PQnfields(), res, size, sprintf, sqlda_struct::sqld, sqlda_dynamic_type(), sqlda_native_total_size(), sqlda_struct::sqldabc, sqlda_struct::sqldaid, sqlda_struct::sqln, sqlvar_struct::sqlname, sqlvar_struct::sqltype, and sqlda_struct::sqlvar.
Referenced by ecpg_process_output(), and ECPGdescribe().
void ecpg_set_compat_sqlda | ( | int | lineno, |
struct sqlda_compat ** | _sqlda, | ||
const PGresult * | res, | ||
int | row, | ||
enum COMPAT_MODE | compat | ||
) |
Definition at line 255 of file sqlda.c.
References numeric::buf, compat, numeric::digits, ECPG_ARRAY_NONE, ecpg_get_data(), ecpg_log(), ecpg_sqlda_align_add_size(), ECPGset_noind_null(), ECPGt_bool, ECPGt_char, ECPGt_date, ECPGt_decimal, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_interval, ECPGt_long, ECPGt_long_long, ECPGt_NO_INDICATOR, ECPGt_numeric, ECPGt_short, ECPGt_string, ECPGt_timestamp, ECPGt_unsigned_char, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, i, numeric::ndigits, numeric(), PGTYPESnumeric_free(), PGTYPESnumeric_from_asc(), PQgetisnull(), PQgetvalue(), res, sqlda_compat::sqld, sqlda_compat_empty_size(), sqlvar_compat::sqldata, sqlvar_compat::sqlilen, sqlvar_compat::sqlilongdata, sqlvar_compat::sqlind, sqlvar_compat::sqlitype, sqlvar_compat::sqllen, sqlvar_compat::sqltype, sqlda_compat::sqlvar, val, value_is_not_null, and value_is_null.
Referenced by ecpg_process_output().
void ecpg_set_native_sqlda | ( | int | lineno, |
struct sqlda_struct ** | _sqlda, | ||
const PGresult * | res, | ||
int | row, | ||
enum COMPAT_MODE | compat | ||
) |
Definition at line 444 of file sqlda.c.
References numeric::buf, compat, numeric::digits, ECPG_ARRAY_NONE, ecpg_get_data(), ecpg_log(), ecpg_sqlda_align_add_size(), ECPGset_noind_null(), ECPGt_bool, ECPGt_char, ECPGt_date, ECPGt_decimal, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_interval, ECPGt_long, ECPGt_long_long, ECPGt_NO_INDICATOR, ECPGt_numeric, ECPGt_short, ECPGt_string, ECPGt_timestamp, ECPGt_unsigned_char, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, i, numeric::ndigits, numeric(), PGTYPESnumeric_free(), PGTYPESnumeric_from_asc(), PQgetisnull(), PQgetvalue(), res, sqlda_struct::sqld, sqlda_native_empty_size(), sqlvar_struct::sqldata, sqlvar_struct::sqlind, sqlvar_struct::sqllen, sqlvar_struct::sqltype, sqlda_struct::sqlvar, val, value_is_not_null, and value_is_null.
Referenced by ecpg_process_output().
|
static |
Definition at line 33 of file sqlda.c.
Referenced by ecpg_set_compat_sqlda(), ecpg_set_native_sqlda(), sqlda_common_total_size(), sqlda_compat_empty_size(), and sqlda_native_empty_size().
|
static |
Definition at line 65 of file sqlda.c.
References numeric::buf, compat, numeric::digits, ecpg_sqlda_align_add_size(), ECPGt_bool, ECPGt_char, ECPGt_date, ECPGt_decimal, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_interval, ECPGt_long, ECPGt_long_long, ECPGt_numeric, ECPGt_short, ECPGt_string, ECPGt_timestamp, ECPGt_unsigned_char, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, i, numeric::ndigits, PGTYPESnumeric_free(), PGTYPESnumeric_from_asc(), PQftype(), PQgetisnull(), PQgetvalue(), PQnfields(), res, sqlda_dynamic_type(), type, and val.
Referenced by sqlda_compat_total_size(), and sqlda_native_total_size().
|
static |
Definition at line 45 of file sqlda.c.
References ecpg_sqlda_align_add_size(), i, PQfname(), PQnfields(), res, and sqlda_compat::sqld.
Referenced by ecpg_set_compat_sqlda(), and sqlda_compat_total_size().
|
static |
Definition at line 157 of file sqlda.c.
References compat, res, sqlda_common_total_size(), and sqlda_compat_empty_size().
Referenced by ecpg_build_compat_sqlda().
|
static |
Definition at line 171 of file sqlda.c.
References ecpg_sqlda_align_add_size(), PQnfields(), res, and sqlda_struct::sqld.
Referenced by ecpg_set_native_sqlda(), and sqlda_native_total_size().
|
static |
Definition at line 186 of file sqlda.c.
References compat, res, sqlda_common_total_size(), and sqlda_native_empty_size().
Referenced by ecpg_build_native_sqlda().
|
static |
Definition at line 252 of file sqlda.c.
Referenced by ecpg_set_compat_sqlda(), and ecpg_set_native_sqlda().
|
static |
Definition at line 251 of file sqlda.c.
Referenced by ecpg_set_compat_sqlda(), and ecpg_set_native_sqlda().