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 ba708ea3dc84, 20 years ago.

Discussion: https://postgr.es/m/20210126195224.GA20361@alvherre.pgsql
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
This commit is contained in:
Alvaro Herrera 2021-01-28 12:50:40 -03:00
parent b034ef9b37
commit 6819b9042f
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE

View File

@ -6040,13 +6040,6 @@ main(int argc, char **argv)
if (con == NULL) if (con == NULL)
exit(1); exit(1);
if (PQstatus(con) == CONNECTION_BAD)
{
pg_log_fatal("connection to database \"%s\" failed: %s",
dbName, PQerrorMessage(con));
exit(1);
}
if (internal_script_used) if (internal_script_used)
GetTableInfo(con, scale_given); GetTableInfo(con, scale_given);