|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include <ctype.h>#include "ecpgerrno.h"#include "ecpglib.h"#include "ecpglib_extern.h"#include "ecpgtype.h"#include "sqlca.h"
Go to the source code of this file.
Data Structures | |
| struct | stmtCacheEntry |
Macros | |
| #define | POSTGRES_ECPG_INTERNAL |
| #define | STMTID_SIZE 32 |
| #define | stmtCacheNBuckets 2039 /* should be a prime number */ |
| #define | stmtCacheEntPerBucket 8 |
| #define | stmtCacheArraySize (stmtCacheNBuckets * stmtCacheEntPerBucket + 1) |
Variables | |
| static int | nextStmtID = 1 |
| static stmtCacheEntry * | stmtCacheEntries = NULL |
| #define stmtCacheArraySize (stmtCacheNBuckets * stmtCacheEntPerBucket + 1) |
|
static |
Definition at line 523 of file prepare.c.
References compat, stmtCacheEntry::connection, ecpg_alloc(), ecpg_freeStmtCacheEntry(), ecpg_strdup(), stmtCacheEntry::ecpgQuery, stmtCacheEntry::execs, fb(), HashStmt(), stmtCacheEntry::lineno, stmtCacheArraySize, stmtCacheEntPerBucket, stmtCacheEntries, and stmtCacheEntry::stmtID.
Referenced by ecpg_auto_prepare().
|
static |
Definition at line 292 of file prepare.c.
References ecpg_alloc(), ecpg_check_PQresult(), ecpg_free(), ECPG_INVALID_STMT, ecpg_log(), ecpg_raise(), ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, fb(), INFORMIX_MODE, name, next, prepared_statement::next, PQclear, PQexec(), connection::prep_stmts, prepared_statement::prepared, sprintf, and stmt.
Referenced by ecpg_deallocate_all_conn(), ecpg_freeStmtCacheEntry(), ecpg_register_prepared_stmt(), ECPGdeallocate(), and ECPGprepare().
| bool ecpg_auto_prepare | ( | int | lineno, |
| const char * | connection_name, | ||
| const int | compat, | ||
| char ** | name, | ||
| const char * | query | ||
| ) |
Definition at line 587 of file prepare.c.
References AddStmtToCache(), compat, ecpg_find_prepared_statement(), ecpg_free(), ecpg_get_connection(), ecpg_log(), ecpg_strdup(), ECPGprepare(), stmtCacheEntry::execs, fb(), name, nextStmtID, prepare_common(), SearchStmtCache(), sprintf, stmtCacheEntries, stmtCacheEntry::stmtID, and STMTID_SIZE.
Referenced by ecpg_do_prologue().
| bool ecpg_deallocate_all_conn | ( | int | lineno, |
| enum COMPAT_MODE | c, | ||
| struct connection * | con | ||
| ) |
Definition at line 369 of file prepare.c.
References deallocate_one(), fb(), and connection::prep_stmts.
Referenced by ecpg_finish(), and ECPGdeallocate_all().
| struct prepared_statement * ecpg_find_prepared_statement | ( | const char * | name, |
| struct connection * | con, | ||
| struct prepared_statement ** | prev_ | ||
| ) |
Definition at line 271 of file prepare.c.
References fb(), name, next, and connection::prep_stmts.
Referenced by ecpg_auto_prepare(), ecpg_freeStmtCacheEntry(), ecpg_prepared(), ecpg_register_prepared_stmt(), ECPGdeallocate(), ECPGdescribe(), and ECPGprepare().
Definition at line 483 of file prepare.c.
References compat, stmtCacheEntry::connection, deallocate_one(), ecpg_find_prepared_statement(), ecpg_free(), ecpg_get_connection(), stmtCacheEntry::ecpgQuery, fb(), stmtCacheEntries, and stmtCacheEntry::stmtID.
Referenced by AddStmtToCache().
| char * ecpg_prepared | ( | const char * | name, |
| struct connection * | con | ||
| ) |
Definition at line 389 of file prepare.c.
References ecpg_find_prepared_statement(), fb(), name, and stmt.
Referenced by ecpg_do_prologue(), and ECPGprepared_statement().
Definition at line 59 of file prepare.c.
References statement::command, connection::connection, deallocate_one(), ecpg_alloc(), ECPG_COMPAT_PGSQL, ecpg_find_prepared_statement(), ecpg_free(), ecpg_strdup(), fb(), statement::lineno, name, statement::name, next, connection::prep_stmts, and stmt.
Referenced by ecpg_execute().
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().
| 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 411 of file prepare.c.
References fb(), stmtCacheEntPerBucket, stmtCacheNBuckets, and UINT64CONST.
Referenced by AddStmtToCache(), and SearchStmtCache().
|
static |
Definition at line 172 of file prepare.c.
References ecpg_alloc(), ecpg_check_PQresult(), ecpg_free(), ecpg_log(), ecpg_strdup(), fb(), statement::lineno, name, next, PQclear, PQprepare(), connection::prep_stmts, replace_variables(), and stmt.
Referenced by ecpg_auto_prepare(), and ECPGprepare().
Definition at line 117 of file prepare.c.
References ecpg_alloc(), ecpg_free(), false, fb(), isvarchar(), len, statement::lineno, and snprintf.
Referenced by prepare_common().
Definition at line 447 of file prepare.c.
References fb(), HashStmt(), stmtCacheEntPerBucket, and stmtCacheEntries.
Referenced by ecpg_auto_prepare().
|
static |
Definition at line 37 of file prepare.c.
Referenced by ecpg_auto_prepare().
|
static |
Definition at line 38 of file prepare.c.
Referenced by AddStmtToCache(), ecpg_auto_prepare(), ecpg_freeStmtCacheEntry(), and SearchStmtCache().