Re: psql now shows zero elapsed time after an error
| От | Peter Eisentraut |
|---|---|
| Тема | Re: psql now shows zero elapsed time after an error |
| Дата | |
| Msg-id | 31e904d3-59d8-1052-967e-f38f752dca12@enterprisedb.com обсуждение исходный текст |
| Ответ на | Re: psql now shows zero elapsed time after an error (Fabien COELHO <coelho@cri.ensmp.fr>) |
| Ответы |
Re: psql now shows zero elapsed time after an error
|
| Список | pgsql-hackers |
On 10.05.22 15:42, Fabien COELHO wrote: > > Hello, > > Thanks for the catch and the proposed fix! Indeed, on errors the timing > is not updated appropriately. > > ISTM that the best course is to update the elapsed time whenever a > result is obtained, so that a sensible value is always available. > > See attached patch which is a variant of Richard's version. > > fabien=# SELECT 1 as one \; SELECT 1/0 \; SELECT 2 as two; > ┌─────┐ > │ one │ > ├─────┤ > │ 1 │ > └─────┘ > (1 row) > > ERROR: division by zero > Time: 0,352 ms > > Probably it would be appropriate to add a test case. I'll propose > something later. committed with a test
В списке pgsql-hackers по дате отправления: