psql: Update \timing also in case of an error
Peter Eisentraut <peter@eisentraut.org>
psql: Update \timing also in case of an error The changes to show all query results (7844c9918) broke \timing output in case of an error; it didn't update the timing result and showed 0.000 ms. Fix by updating the timing result also in the error case. Also, for robustness, update the timing result any time a result is obtained, not only for the last, so a sensible value is always available. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Author: Richard Guo <guofenglinux@gmail.com> Author: Fabien COELHO <coelho@cri.ensmp.fr> Discussion: https://www.postgresql.org/message-id/3813350.1652111765%40sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/psql/common.c | modified | +12 −2 |
| src/bin/psql/t/001_basic.pl | modified | +10 −2 |
Discussion
- psql now shows zero elapsed time after an error 5 messages · 2022-05-09 → 2022-05-23