diff options
author | Fujii Masao <fujii@postgresql.org> | 2014-10-23 22:33:56 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2014-10-23 22:33:56 +0900 |
commit | efbbbbc8b51bacd32e96c3f747dd6aa4c0e444cb (patch) | |
tree | 8c5746809cd085c7c82a33e2488103aab860e96d /src/bin/psql/common.c | |
parent | 5ac372fc1a7cc673cc7d4cf26ba651d52495b27a (diff) | |
download | postgresql-efbbbbc8b51bacd32e96c3f747dd6aa4c0e444cb.tar.gz postgresql-efbbbbc8b51bacd32e96c3f747dd6aa4c0e444cb.zip |
Remove the unused argument of PSQLexec().
This commit simply removes the second argument of PSQLexec that was
set to the same value everywhere. Comments and code blocks related
to this parameter are removed.
Noticed by Heikki Linnakangas, reviewed by Michael Paquier
Diffstat (limited to 'src/bin/psql/common.c')
-rw-r--r-- | src/bin/psql/common.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index 0f83799f7e0..66d80b51645 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -426,10 +426,6 @@ AcceptResult(const PGresult *result) * This is the way to send "backdoor" queries (those not directly entered * by the user). It is subject to -E but not -e. * - * In autocommit-off mode, a new transaction block is started if start_xact - * is true; nothing special is done when start_xact is false. Typically, - * start_xact = false is used for SELECTs and explicit BEGIN/COMMIT commands. - * * Caller is responsible for handling the ensuing processing if a COPY * command is sent. * @@ -437,7 +433,7 @@ AcceptResult(const PGresult *result) * caller uses this path to issue "SET CLIENT_ENCODING". */ PGresult * -PSQLexec(const char *query, bool start_xact) +PSQLexec(const char *query) { PGresult *res; @@ -468,21 +464,6 @@ PSQLexec(const char *query, bool start_xact) SetCancelConn(); - if (start_xact && - !pset.autocommit && - PQtransactionStatus(pset.db) == PQTRANS_IDLE) - { - res = PQexec(pset.db, "BEGIN"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) - { - psql_error("%s", PQerrorMessage(pset.db)); - PQclear(res); - ResetCancelConn(); - return NULL; - } - PQclear(res); - } - res = PQexec(pset.db, query); ResetCancelConn(); |