Commit 64710452 authored by Tom Lane's avatar Tom Lane

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>
parent 8299471c
...@@ -1898,6 +1898,7 @@ top: ...@@ -1898,6 +1898,7 @@ top:
{ {
case PGRES_COMMAND_OK: case PGRES_COMMAND_OK:
case PGRES_TUPLES_OK: case PGRES_TUPLES_OK:
case PGRES_EMPTY_QUERY:
break; /* OK */ break; /* OK */
default: default:
fprintf(stderr, "client %d aborted in state %d: %s", fprintf(stderr, "client %d aborted in state %d: %s",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment