projects
/
users
/
heikki
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8299471
)
Allow empty queries in pgbench.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Fri, 19 Aug 2016 21:32:59 +0000
(17:32 -0400)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Fri, 19 Aug 2016 21:32:59 +0000
(17:32 -0400)
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>
src/bin/pgbench/pgbench.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pgbench/pgbench.c
b/src/bin/pgbench/pgbench.c
index 87fb006d87966de71969daa765f00af09ac5a95d..802795512197540271782e8ee19609975fd88e5c 100644
(file)
--- 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",