Commit 9520f8d
committed
psql: Update \timing also in case of an error
The changes to show all query results (7844c99) 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.us1 parent 6e647ef commit 9520f8d
2 files changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1566 | 1566 | | |
1567 | 1567 | | |
1568 | 1568 | | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
1569 | 1579 | | |
1570 | 1580 | | |
1571 | 1581 | | |
| |||
1619 | 1629 | | |
1620 | 1630 | | |
1621 | 1631 | | |
1622 | | - | |
| 1632 | + | |
1623 | 1633 | | |
1624 | 1634 | | |
1625 | 1635 | | |
| |||
1630 | 1640 | | |
1631 | 1641 | | |
1632 | 1642 | | |
1633 | | - | |
| 1643 | + | |
1634 | 1644 | | |
1635 | 1645 | | |
1636 | 1646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
| |||
0 commit comments