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[email protected]
Reviewed-by: Tom Lane <[email protected]>
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)
{
/*