Hello Michaƫl,

You may want to name your patches with .patch or .diff. Using .sql is disturbing style :)

Indeed! :-)

Indeed, not reporting the progress back to the client in the case of a
script with only meta commands is non-intuitive.

This looks good to me. I'd just rewrite the comment block with
something like that, more simplified:

Ok. Here is an updated version, with a better suffix and a simplified comment.


diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 87fb006..4e7449e 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -2172,8 +2172,12 @@ top:
 				st->listen = true;
-		/* after a meta command, immediately proceed with next command */
-		goto top;
+		/*
+		 * After a meta command immediately proceed with next command,
+		 * but if it is the last command, just leave.
+		 */
+		if (commands[st->state + 1] != NULL)
+			goto top;
 	return true;
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to