|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include "catalog/pg_type_d.h"#include "ecpg-pthread-win32.h"#include "ecpgerrno.h"#include "ecpglib.h"#include "ecpglib_extern.h"#include "ecpgtype.h"#include "sql3types.h"#include "sqlca.h"#include "sqlda.h"
Go to the source code of this file.
Macros | |
| #define | POSTGRES_ECPG_INTERNAL |
| #define | RETURN_IF_NO_DATA |
Variables | |
| static pthread_key_t | descriptor_key |
| static pthread_once_t | descriptor_once = PTHREAD_ONCE_INIT |
| #define POSTGRES_ECPG_INTERNAL |
Definition at line 6 of file descriptor.c.
| #define RETURN_IF_NO_DATA |
Definition at line 226 of file descriptor.c.
|
static |
Definition at line 788 of file descriptor.c.
References descriptor_free(), and next.
Referenced by descriptor_destructor().
Definition at line 28 of file descriptor.c.
References arg, and descriptor_deallocate_all().
Referenced by descriptor_key_init().
|
static |
Definition at line 736 of file descriptor.c.
References ecpg_free(), fb(), descriptor::items, descriptor::name, PQclear, and descriptor::result.
Referenced by descriptor_deallocate_all(), and ECPGdeallocate_desc().
Definition at line 34 of file descriptor.c.
References descriptor_destructor(), descriptor_key, and fb().
Referenced by get_descriptors().
Definition at line 64 of file descriptor.c.
References fb(), SQL3_DDT_DATE, SQL3_DDT_ILLEGAL, SQL3_DDT_TIME, SQL3_DDT_TIME_WITH_TIME_ZONE, SQL3_DDT_TIMESTAMP, SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE, and type.
Referenced by ECPGget_desc().
| struct descriptor * ecpg_find_desc | ( | int | line, |
| const char * | name | ||
| ) |
Definition at line 840 of file descriptor.c.
References ecpg_raise(), ECPG_SQLSTATE_INVALID_SQL_DESCRIPTOR_NAME, ECPG_UNKNOWN_DESCRIPTOR, fb(), get_descriptors(), name, descriptor::name, and descriptor::next.
Referenced by ecpg_build_params(), ecpg_process_output(), ecpg_result_by_descriptor(), ECPGdescribe(), ECPGset_desc(), and ECPGset_desc_header().
Definition at line 54 of file descriptor.c.
References ecpg_find_desc(), fb(), name, and descriptor::result.
Referenced by ECPGget_desc(), and ECPGget_desc_header().
Definition at line 800 of file descriptor.c.
References ecpg_alloc(), ecpg_free(), ecpg_init_sqlca(), ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPGget_sqlca(), fb(), get_descriptors(), name, PQmakeEmptyPGresult(), set_descriptors(), and sqlca.
Referenced by execute_test(), fn(), main(), and main().
Definition at line 756 of file descriptor.c.
References descriptor_free(), ecpg_init_sqlca(), ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_INVALID_SQL_DESCRIPTOR_NAME, ECPG_UNKNOWN_DESCRIPTOR, ECPGget_sqlca(), fb(), get_descriptors(), name, descriptor::name, descriptor::next, set_descriptors(), and sqlca.
Referenced by execute_test(), fn(), main(), and main().
| bool ECPGdescribe | ( | int | line, |
| int | compat, | ||
| bool | input, | ||
| const char * | connection_name, | ||
| const char * | stmt_name, | ||
| ... | |||
| ) |
Definition at line 855 of file descriptor.c.
References compat, connection::connection, sqlda_compat::desc_next, sqlda_struct::desc_next, ecpg_build_compat_sqlda(), ecpg_build_native_sqlda(), ecpg_check_PQresult(), ecpg_find_desc(), ecpg_find_prepared_statement(), ecpg_get_connection(), ecpg_gettext, ECPG_INVALID_STMT, ECPG_NO_CONN, ecpg_raise(), ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, ECPG_UNSUPPORTED, ECPGt_descriptor, ECPGt_EORT, ECPGt_sqlda, fb(), free, INFORMIX_MODE, input, name, PQclear, PQdescribePrepared(), descriptor::result, and type.
Referenced by execute_test(), and main().
Definition at line 234 of file descriptor.c.
References Assert, ecpg_auto_alloc(), ecpg_dynamic_type(), ecpg_dynamic_type_DDT(), ecpg_free(), ecpg_get_connection(), ecpg_init_sqlca(), ECPG_INVALID_DESCRIPTOR_INDEX, ecpg_log(), ECPG_OUT_OF_MEMORY, ecpg_raise(), ecpg_result_by_descriptor(), ECPG_SQLSTATE_CARDINALITY_VIOLATION, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_INVALID_DESCRIPTOR_INDEX, ecpg_store_result(), ecpg_strdup(), ECPG_TOO_MANY_MATCHES, ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPGd_cardinality, ECPGd_data, ECPGd_di_code, ECPGd_EODT, ECPGd_indicator, ECPGd_key_member, ECPGd_length, ECPGd_name, ECPGd_nullable, ECPGd_octet, ECPGd_precision, ECPGd_ret_length, ECPGd_ret_octet, ECPGd_scale, ECPGd_type, ECPGget_sqlca(), ECPGt_EORT, ECPGt_NO_INDICATOR, fb(), get_char_item(), get_int_item(), statement::lineno, locale_t, PQfmod(), PQfname, PQfsize(), PQftype(), PQgetisnull, PQgetlength, PQnfields, PQntuples, RETURN_IF_NO_DATA, setlocale, snprintf, sqlca, stmt, type, and VARHDRSZ.
Referenced by execute_test(), main(), and main().
Definition at line 84 of file descriptor.c.
References ecpg_init_sqlca(), ecpg_log(), ECPG_OUT_OF_MEMORY, ecpg_raise(), ecpg_result_by_descriptor(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPGget_sqlca(), fb(), PQnfields, and sqlca.
Referenced by execute_test(), main(), and main().
Definition at line 613 of file descriptor.c.
References variable::arrsize, descriptor::count, ecpg_alloc(), ecpg_find_desc(), ecpg_free(), ecpg_raise(), ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, ecpg_store_input(), ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPGd_data, ECPGd_EODT, ECPGd_indicator, ECPGd_length, ECPGd_precision, ECPGd_scale, ECPGd_type, fb(), descriptor::items, variable::next, variable::offset, variable::pointer, set_desc_attr(), set_int_item(), snprintf, variable::type, variable::value, and variable::varcharsize.
Referenced by main().
Definition at line 581 of file descriptor.c.
References descriptor::count, ecpg_find_desc(), and fb().
Referenced by main().
|
static |
Definition at line 194 of file descriptor.c.
References ecpg_raise(), ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, ECPG_VAR_NOT_CHAR, ECPGt_char, ECPGt_string, ECPGt_unsigned_char, ECPGt_varchar, fb(), and value.
Referenced by ECPGget_desc().
|
static |
Definition at line 40 of file descriptor.c.
References descriptor_key, descriptor_key_init(), descriptor_once, fb(), and pthread_getspecific().
Referenced by ecpg_find_desc(), ECPGallocate_desc(), and ECPGdeallocate_desc().
Definition at line 108 of file descriptor.c.
References ecpg_raise(), ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, ECPG_VAR_NOT_NUMERIC, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_long, ECPGt_long_long, ECPGt_short, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, fb(), and value.
Referenced by ECPGget_desc().
|
static |
Definition at line 592 of file descriptor.c.
References ecpg_free(), ECPGt_bytea, fb(), variable::type, and variable::value.
Referenced by ECPGset_desc().
|
static |
Definition at line 47 of file descriptor.c.
References descriptor_key, pthread_setspecific(), and value.
Referenced by ECPGallocate_desc(), and ECPGdeallocate_desc().
|
static |
Definition at line 151 of file descriptor.c.
References ecpg_raise(), ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, ECPG_VAR_NOT_NUMERIC, ECPGt_double, ECPGt_float, ECPGt_int, ECPGt_long, ECPGt_long_long, ECPGt_short, ECPGt_unsigned_int, ECPGt_unsigned_long, ECPGt_unsigned_long_long, ECPGt_unsigned_short, and fb().
Referenced by ECPGset_desc().
|
static |
Definition at line 22 of file descriptor.c.
Referenced by descriptor_key_init(), get_descriptors(), and set_descriptors().
|
static |
Definition at line 23 of file descriptor.c.
Referenced by get_descriptors().