RE: [PATCH] pgbench: improve \sleep meta command

From: "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'miyake_kouta' <miyake_kouta(at)oss(dot)nttdata(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: [PATCH] pgbench: improve \sleep meta command
Date: 2021-03-05 03:57:56
Message-ID: OSBPR01MB3157E100067D2F8E618F07CEF5969@OSBPR01MB3157.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2021-03-05 04:01:51 Re: EXPLAIN/EXPLAIN ANALYZE REFRESH MATERIALIZED VIEW
Previous Message Fujii Masao 2021-03-05 03:47:00 Re: About to add WAL write/fsync statistics to pg_stat_wal view