Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6471045

Browse files
committed
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>
1 parent 8299471 commit 6471045

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bin/pgbench/pgbench.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,6 +1898,7 @@ doCustom(TState *thread, CState *st, StatsData *agg)
18981898
{
18991899
case PGRES_COMMAND_OK:
19001900
case PGRES_TUPLES_OK:
1901+
case PGRES_EMPTY_QUERY:
19011902
break; /* OK */
19021903
default:
19031904
fprintf(stderr, "client %d aborted in state %d: %s",

0 commit comments

Comments
 (0)