diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-01-16 16:36:41 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-01-16 16:36:41 -0300 |
commit | 3291301385ee5e9ca38d70a68b93ce31cc2674ac (patch) | |
tree | 6b7e3fcbd7c58d57413d8e922f2bd63ee8ddf69b /src/interfaces/ecpg/ecpglib/extern.h | |
parent | 8ba288da5dce7bd890dd968ddb9664931099b8c5 (diff) | |
download | postgresql-3291301385ee5e9ca38d70a68b93ce31cc2674ac.tar.gz postgresql-3291301385ee5e9ca38d70a68b93ce31cc2674ac.zip |
Split ECPGdo() in constituent parts
This splits ECPGdo() into ecpg_prologue(), ecpg_do() and
ecpg_epilogue(), and renames free_params() into ecpg_free_params() and
exports it. This makes it possible for future code to use these
routines for their own purposes.
There is no user-visible functionality change here, only code
reorganization.
Zoltán Böszörményi
Reviewed by Antonin Houska. Larger, older versions of this patch were
reviewed by Noah Misch and Michael Meskes.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/extern.h')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/extern.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h index 835e70c38f4..83ea011853d 100644 --- a/src/interfaces/ecpg/ecpglib/extern.h +++ b/src/interfaces/ecpg/ecpglib/extern.h @@ -60,6 +60,9 @@ struct statement bool questionmarks; struct variable *inlist; struct variable *outlist; + char *oldlocale; + int nparams; + char **paramvalues; }; /* structure to store prepared statements for a connection */ @@ -164,6 +167,13 @@ struct prepared_statement *ecpg_find_prepared_statement(const char *, bool ecpg_store_result(const PGresult *results, int act_field, const struct statement * stmt, struct variable * var); bool ecpg_store_input(const int, const bool, const struct variable *, char **, bool); +void ecpg_free_params(struct statement *stmt, bool print); +void ecpg_do_epilogue(struct statement *); +bool ecpg_do_prologue(int, const int, const int, const char *, const bool, + enum ECPG_statement_type, const char *, va_list, + struct statement **); +bool ecpg_do(const int, const int, const int, const char *, const bool, + const int, const char *, va_list); bool ecpg_check_PQresult(PGresult *, int, PGconn *, enum COMPAT_MODE); void ecpg_raise(int line, int code, const char *sqlstate, const char *str); |