mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user