aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-08-19 17:32:59 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-08-19 17:32:59 -0400
commit6471045230f5d891ad724c54d406e2214f3c96d9 (patch)
tree7824ffdf01af5e60de487f19b56391f1e206a7c9 /src
parent8299471c37fff0b0f5a777a12f920125310c0efe (diff)
downloadpostgresql-6471045230f5d891ad724c54d406e2214f3c96d9.tar.gz
postgresql-6471045230f5d891ad724c54d406e2214f3c96d9.zip
Allow empty queries in pgbench.
This might have been too much of a foot-gun before 9.6, but with the new commands-end-at-semicolons parsing rule, the only way to get an empty query into a script is to explicitly write an extra ";". So we may as well allow the case. Fabien Coelho Patch: <alpine.DEB.2.20.1607090922170.3412@sto>
Diffstat (limited to 'src')
-rw-r--r--src/bin/pgbench/pgbench.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 87fb006d879..80279551219 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -1898,6 +1898,7 @@ top:
{
case PGRES_COMMAND_OK:
case PGRES_TUPLES_OK:
+ case PGRES_EMPTY_QUERY:
break; /* OK */
default:
fprintf(stderr, "client %d aborted in state %d: %s",