Skip to content

Commit cfbbc1f

Browse files
committed
pgbench: Remove dead code
doConnect() never returns connections in state CONNECTION_BAD, so checking for that is pointless. Remove the code that does. This code has been dead since ba708ea, 20 years ago. Discussion: https://postgr.es/m/20210126195224.GA20361@alvherre.pgsql Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
1 parent f2dc962 commit cfbbc1f

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/bin/pgbench/pgbench.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,14 +3310,6 @@ main(int argc, char **argv)
33103310
if (con == NULL)
33113311
exit(1);
33123312

3313-
if (PQstatus(con) == CONNECTION_BAD)
3314-
{
3315-
fprintf(stderr, "connection to database \"%s\" failed\n",
3316-
PQdb(con) ? PQdb(con) : "");
3317-
fprintf(stderr, "%s", PQerrorMessage(con));
3318-
exit(1);
3319-
}
3320-
33213313
if (ttype != 3)
33223314
{
33233315
/*

0 commit comments

Comments
 (0)