diff options
author | Fujii Masao <fujii@postgresql.org> | 2021-03-22 12:02:44 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2021-03-22 12:04:48 +0900 |
commit | 8c6eda2d1c926be76baa79c28521275323bd26fd (patch) | |
tree | c347ddd0fecb9df750bf5661c429b77ba7b5f5e3 /src/backend/access/gist/gistutil.c | |
parent | e3f4aec027891f794328050e62c9bbbe4ae02811 (diff) | |
download | postgresql-8c6eda2d1c926be76baa79c28521275323bd26fd.tar.gz |
pgbench: Improve error-handling in \sleep command.
This commit improves pgbench \sleep command so that it handles
the following three cases more properly.
(1) When only one argument was specified in \sleep command and
it's not a number, previously pgbench reported a confusing error
message like "unrecognized time unit, must be us, ms or s".
This commit fixes this so that more proper error message like
"invalid sleep time, must be an integer" is reported.
(2) When two arguments were specified in \sleep command and
the first argument was not a number, previously pgbench treated
that argument as the sleep time 0. No error was reported in this
case. This commit fixes this so that an error is thrown in this
case.
(3) When a variable was specified as the first argument in \sleep
command and the variable stored non-digit value, previously
pgbench treated that argument as the sleep time 0. No error
was reported in this case. This commit fixes this so that
an error is thrown in this case.
Author: Kota Miyake
Reviewed-by: Hayato Kuroda, Alvaro Herrera, Fujii Masao
Discussion: https://postgr.es/m/23b254daf20cec4332a2d9168505dbc9@oss.nttdata.com
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions