- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit8c6eda2
committed
pgbench: Improve error-handling in \sleep command.
This commit improves pgbench \sleep command so that it handlesthe 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 MiyakeReviewed-by: Hayato Kuroda, Alvaro Herrera, Fujii MasaoDiscussion:https://postgr.es/m/23b254daf20cec4332a2d9168505dbc9@oss.nttdata.com1 parente3f4aec commit8c6eda2
1 file changed
+38
-5
lines changedLines changed: 38 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2953 | 2953 |
| |
2954 | 2954 |
| |
2955 | 2955 |
| |
| 2956 | + | |
2956 | 2957 |
| |
| 2958 | + | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
2957 | 2966 |
| |
2958 | 2967 |
| |
2959 | 2968 |
| |
| |||
4788 | 4797 |
| |
4789 | 4798 |
| |
4790 | 4799 |
| |
4791 |
| - | |
| 4800 | + | |
4792 | 4801 |
| |
4793 | 4802 |
| |
| 4803 | + | |
| 4804 | + | |
| 4805 | + | |
| 4806 | + | |
| 4807 | + | |
| 4808 | + | |
| 4809 | + | |
| 4810 | + | |
| 4811 | + | |
4794 | 4812 |
| |
4795 |
| - | |
| 4813 | + | |
| 4814 | + | |
4796 | 4815 |
| |
| 4816 | + | |
4797 | 4817 |
| |
4798 | 4818 |
| |
4799 |
| - | |
4800 |
| - | |
4801 |
| - | |
| 4819 | + | |
| 4820 | + | |
| 4821 | + | |
| 4822 | + | |
| 4823 | + | |
| 4824 | + | |
| 4825 | + | |
| 4826 | + | |
| 4827 | + | |
| 4828 | + | |
| 4829 | + | |
| 4830 | + | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
| 4834 | + | |
4802 | 4835 |
| |
4803 | 4836 |
| |
4804 | 4837 |
| |
|
0 commit comments
Comments
(0)