|
PostgreSQL Source Code git master
|
#include <stdbool.h>#include <string.h>#include "ecpg_config.h"#include "ecpgtype.h"#include "libpq-fe.h"#include "sqlca.h"

Go to the source code of this file.
Macros | |
| #define | SQLCODE sqlca.sqlcode |
| #define | SQLSTATE sqlca.sqlstate |
Definition at line 30 of file connect.c.
References actual_connection_key_once, ecpg_actual_connection_init(), and fb().
Referenced by ecpg_do_prologue(), ecpg_get_connection(), ecpg_get_connection_nr(), and ECPGconnect().
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().
| bool ECPGconnect | ( | int | lineno, |
| int | c, | ||
| const char * | name, | ||
| const char * | user, | ||
| const char * | passwd, | ||
| const char * | connection_name, | ||
| int | autocommit | ||
| ) |
Definition at line 260 of file connect.c.
References a, actual_connection, actual_connection_key, all_connections, Assert, autocommit, connection::cache_head, compat, CONNECTION_BAD, connections_mutex, dbname, ecpg_alloc(), ecpg_clear_auto_mem(), ECPG_CONNECT, ecpg_finish(), ecpg_free(), ecpg_get_connection(), ecpg_gettext, ecpg_init_sqlca(), ecpg_internal_regression_mode, ecpg_log(), ECPG_OUT_OF_MEMORY, ecpg_pthreads_init(), ecpg_raise(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, ecpg_strdup(), ECPGget_sqlca(), ECPGnoticeReceiver(), errmsg(), fb(), free, i, INFORMIX_MODE, last_dir_separator(), locale_t, name, next, port, PQconnectdbParams(), PQerrorMessage(), PQsetNoticeReceiver(), PQstatus(), connection::prep_stmts, pthread_mutex_lock(), pthread_mutex_unlock(), pthread_setspecific(), sqlca, str, and user.
Referenced by fn(), fn(), main(), main(), test(), and test_thread().
Definition at line 347 of file prepare.c.
References deallocate_one(), ecpg_find_prepared_statement(), ecpg_get_connection(), ecpg_init(), ECPG_INVALID_STMT, ecpg_raise(), ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, fb(), INFORMIX_MODE, and name.
Referenced by execute_test(), fn(), and main().
Definition at line 382 of file prepare.c.
References compat, ecpg_deallocate_all_conn(), ecpg_get_connection(), and fb().
Referenced by 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().
Definition at line 204 of file misc.c.
References debug_init_mutex, debug_mutex, debugstream, ecpg_internal_regression_mode, ecpg_log(), fb(), pthread_mutex_lock(), pthread_mutex_unlock(), and simple_debug.
| 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 693 of file connect.c.
References all_connections, connections_mutex, ecpg_finish(), ecpg_get_connection_nr(), ecpg_init(), ecpg_init_sqlca(), ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPGget_sqlca(), fb(), connection::next, pthread_mutex_lock(), pthread_mutex_unlock(), and sqlca.
Referenced by fn(), fn(), main(), main(), test(), and test_thread().
| bool ECPGdo | ( | const int | lineno, |
| const int | compat, | ||
| const int | force_indicator, | ||
| const char * | connection_name, | ||
| const bool | questionmarks, | ||
| const int | st, | ||
| const char * | query, | ||
| ... | |||
| ) |
Definition at line 2291 of file execute.c.
References compat, ecpg_do(), fb(), force_indicator, statement::lineno, and questionmarks.
Referenced by check_result_of_insert(), close_cur1(), ECPGdo_descriptor(), execute_test(), fn(), fn(), get_record1(), main(), main(), open_cur1(), openit(), test(), and test_thread().
| bool ECPGdo_descriptor | ( | int | line, |
| const char * | connection, | ||
| const char * | descriptor, | ||
| const char * | query | ||
| ) |
Definition at line 2306 of file execute.c.
References ECPG_COMPAT_PGSQL, ECPGdo(), ECPGt_descriptor, ECPGt_EOIT, ECPGt_EORT, ECPGt_NO_INDICATOR, and fb().
Definition at line 140 of file memory.c.
References ecpg_free(), fb(), get_auto_allocs(), auto_mem::next, and set_auto_allocs().
Referenced by auto_mem_destructor(), ecpg_raise(), ecpg_raise_backend(), ECPGset_var(), 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 737 of file connect.c.
References connection::connection, ecpg_get_connection(), and fb().
Definition at line 593 of file misc.c.
References fb(), ivlist, var_list::next, var_list::number, and var_list::pointer.
Referenced by ECPG_informix_get_var(), get_record1(), open_cur1(), and openit().
Definition at line 361 of file misc.c.
References _check(), ECPGgeneric_bytea::arr, ECPGt_bytea, 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, ECPGt_varchar, fb(), len, LONG_LONG_MIN, NUMERIC_NULL, sign, and type.
Referenced by ecpg_store_input(), and risnull().
| bool ECPGprepare | ( | int | lineno, |
| const char * | connection_name, | ||
| const bool | questionmarks, | ||
| const char * | name, | ||
| const char * | variable | ||
| ) |
Definition at line 249 of file prepare.c.
References deallocate_one(), ECPG_COMPAT_PGSQL, ecpg_find_prepared_statement(), ecpg_get_connection(), ecpg_init(), fb(), name, prepare_common(), and questionmarks.
Referenced by ecpg_auto_prepare(), execute_test(), fn(), main(), main(), and test().
Definition at line 400 of file prepare.c.
References ecpg_get_connection(), ecpg_prepared(), fb(), and name.
Referenced by execute_test(), main(), main(), and test().
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().
Definition at line 292 of file misc.c.
References ECPGt_bytea, 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, ECPGt_varchar, fb(), LONG_LONG_MIN, NUMERIC_NULL, and type.
Referenced by ecpg_get_data(), ecpg_set_compat_sqlda(), ecpg_set_native_sqlda(), and rsetnull().
Definition at line 538 of file misc.c.
References calloc, ecpg_init_sqlca(), ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, ECPGfree_auto_mem(), ECPGget_sqlca(), fb(), ivlist, var_list::next, var_list::number, var_list::pointer, snprintf, and sqlca.
Referenced by ECPG_informix_set_var(), get_var1(), and main().
Definition at line 158 of file connect.c.
References connection::autocommit, connection::connection, ecpg_check_PQresult(), ECPG_COMPAT_PGSQL, ecpg_get_connection(), ecpg_init(), ecpg_log(), fb(), mode, connection::name, PQclear, PQexec(), PQTRANS_IDLE, and PQtransactionStatus().
Definition at line 195 of file connect.c.
References actual_connection_key, ecpg_get_connection(), ecpg_init(), fb(), and pthread_setspecific().
Referenced by main().
Definition at line 127 of file misc.c.
References connection::connection, ecpg_get_connection(), ecpg_init(), ECPG_NOT_CONN, ecpg_raise(), ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, fb(), and connection::name.
Definition at line 160 of file misc.c.
References connection::autocommit, connection::connection, ecpg_check_PQresult(), ECPG_COMPAT_PGSQL, ecpg_get_connection(), ecpg_init(), ecpg_log(), fb(), connection::name, PQclear, PQexec(), PQTRANS_IDLE, and PQtransactionStatus().
Referenced by commitTable(), main(), main(), sql_check(), and test_thread().
| PGTransactionStatusType ECPGtransactionStatus | ( | const char * | connection_name | ) |
Definition at line 145 of file misc.c.
References connection::connection, ecpg_get_connection(), fb(), PQTRANS_UNKNOWN, and PQtransactionStatus().
Definition at line 334 of file error.c.
References ecpg_gettext, ecpg_log(), ECPGget_sqlca(), fb(), fprintf, and sqlca.
Referenced by check_result_of_insert(), commitTable(), execute_test(), fn(), fn(), fn(), main(), main(), print(), print2(), test(), and test_thread().