summaryrefslogtreecommitdiff
path: root/src/bin/pgbench
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pgbench')
-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 cc03af05447..36c6469149e 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -3356,7 +3356,7 @@ readCommandResponse(CState *st, MetaCommand meta, char *varprefix)
st->num_syncs--;
if (st->num_syncs == 0 && 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:
@@ -3366,7 +3366,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 */
@@ -3375,7 +3375,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;
}