Re: psql now shows zero elapsed time after an error

2022-05-23 Thread Fabien COELHO
Probably it would be appropriate to add a test case. I'll propose something later. committed with a test Thanks! -- Fabien.

Re: psql now shows zero elapsed time after an error

2022-05-23 Thread Peter Eisentraut
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

Re: psql now shows zero elapsed time after an error

2022-05-10 Thread Fabien COELHO
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

Re: psql now shows zero elapsed time after an error

2022-05-09 Thread Richard Guo
On Mon, May 9, 2022 at 11:56 PM Tom Lane wrote: > Example (you need up-to-the-minute HEAD for this particular test > case, but anything that runs a little while before failing will do): > > regression=# \timing > Timing is on. > regression=# select * from generate_series('2022-01-01

psql now shows zero elapsed time after an error

2022-05-09 Thread Tom Lane
Example (you need up-to-the-minute HEAD for this particular test case, but anything that runs a little while before failing will do): regression=# \timing Timing is on. regression=# select * from generate_series('2022-01-01 00:00'::timestamptz, 'infinity'::timestamptz,