forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6f9ee74
committed
Improve handling of psql \watch's interval argument
A failure in parsing the interval value defined in the \watch commandwas silently switched to 1s of interval between two queries, which canbe confusing. This commit improves the error handling, and a couple oftests are added to check after:- An incorrect value.- An out-of-range value.- A negative value.A value of zero is able to work now, meaning that there is no intervalof time between two queries in a \watch loop. No backpatch is done, asit could break existing applications.Author: Andrey BorodinReviewed-by: Kyotaro Horiguchi, Nathan Bossart, Michael PaquierDiscussion:https://postgr.es/m/CAAhFRxiZ2-n_L1ErMm9AZjgmUK=qS6VHb+0SaMn8sqqbhF7How@mail.gmail.com1 parentdccb4d1 commit6f9ee74
2 files changed
+32
-3
lines changedLines changed: 15 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2776 | 2776 |
| |
2777 | 2777 |
| |
2778 | 2778 |
| |
2779 |
| - | |
2780 |
| - | |
2781 |
| - | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
2782 | 2791 |
| |
2783 | 2792 |
| |
2784 | 2793 |
| |
| |||
5183 | 5192 |
| |
5184 | 5193 |
| |
5185 | 5194 |
| |
| 5195 | + | |
| 5196 | + | |
| 5197 | + | |
5186 | 5198 |
| |
5187 | 5199 |
| |
5188 | 5200 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
350 | 350 |
| |
351 | 351 |
| |
352 | 352 |
| |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
353 | 370 |
|
0 commit comments
Comments
(0)