projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30f912a
)
pgbench: Remove dead code
author
Alvaro Herrera
<
[email protected]
>
Thu, 28 Jan 2021 15:50:40 +0000
(12:50 -0300)
committer
Alvaro Herrera
<
[email protected]
>
Thu, 28 Jan 2021 15:50:40 +0000
(12:50 -0300)
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]
>
src/bin/pgbench/pgbench.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pgbench/pgbench.c
b/src/bin/pgbench/pgbench.c
index 79b983b4ef51640953b0cb41869a81eb630ff8f2..72b952056fe3d85828d67a66ba03e4139a28a37e 100644
(file)
--- a/
src/bin/pgbench/pgbench.c
+++ b/
src/bin/pgbench/pgbench.c
@@
-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)
{
/*