summaryrefslogtreecommitdiff
path: root/src/bin/pgbench/pgbench.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pgbench/pgbench.c')
-rw-r--r--src/bin/pgbench/pgbench.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 3b1d9b25daf..a7fba6cd695 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -3341,7 +3341,7 @@ readCommandResponse(CState *st, MetaCommand meta, char *varprefix)
pg_log_debug("client %d pipeline ending", st->id);
if (PQexitPipelineMode(st->con) != 1)
pg_log_error("client %d failed to exit pipeline mode: %s", st->id,
- PQerrorMessage(st->con));
+ PQresultErrorMessage(res));
break;
case PGRES_NONFATAL_ERROR:
@@ -3351,7 +3351,7 @@ readCommandResponse(CState *st, MetaCommand meta, char *varprefix)
if (canRetryError(st->estatus))
{
if (verbose_errors)
- commandError(st, PQerrorMessage(st->con));
+ commandError(st, PQresultErrorMessage(res));
goto error;
}
/* fall through */
@@ -3360,7 +3360,7 @@ readCommandResponse(CState *st, MetaCommand meta, char *varprefix)
/* anything else is unexpected */
pg_log_error("client %d script %d aborted in command %d query %d: %s",
st->id, st->use_file, st->command, qrynum,
- PQerrorMessage(st->con));
+ PQresultErrorMessage(res));
goto error;
}