mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-06 18:09:21 +02:00
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 ba708ea3dc
, 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:
parent
30f912a413
commit
30854d94c6
@ -5676,14 +5676,6 @@ main(int argc, char **argv)
|
||||
if (con == NULL)
|
||||
exit(1);
|
||||
|
||||
if (PQstatus(con) == CONNECTION_BAD)
|
||||
{
|
||||
fprintf(stderr, "connection to database \"%s\" failed\n",
|
||||
PQdb(con) ? PQdb(con) : "");
|
||||
fprintf(stderr, "%s", PQerrorMessage(con));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (internal_script_used)
|
||||
{
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user