RE: [PATCH] pgbench: improve \sleep meta command
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
To: 'miyake_kouta' <miyake_kouta@oss.nttdata.com>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2021-03-05T03:57:56Z
Lists: pgsql-hackers
Dear Miyake-san,
I agree your suggestions and I think this patch is basically good.
I put some comments:
* When the following line is input, the error message is not happy.
I think output should be " \sleep command argument must be an integer...".
\sleep foo
-> pgbench: fatal: test.sql:5: unrecognized time unit, must be us, ms or s (foo) in command "sleep"
\sleep foo
^ error found here
I'm not sure but I think this is caused because `my_command->argv[2]` becomes "foo".
* A blank is missed in some lines, for example:
> + if (my_command->argc ==2)
A blank should be added between a variable and an operator.
Could you fix them?
Best Regards,
Hayato Kuroda
FUJITSU LIMITED
Commits
-
pgbench: Improve error-handling in \sleep command.
- 8c6eda2d1c92 14.0 landed