aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pgstatfuncs.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-03-16 09:32:36 +0900
committerMichael Paquier <michael@paquier.xyz>2023-03-16 09:32:36 +0900
commit6f9ee74d45aa7c1836b6c12b6e2a958327c16ab5 (patch)
tree5176745f7336006c18af508363900cbd5d348ede /src/backend/utils/adt/pgstatfuncs.c
parentdccb4d1c039194a57bfb9b39f0412a2b7f7c5104 (diff)
downloadpostgresql-6f9ee74d45aa7c1836b6c12b6e2a958327c16ab5.tar.gz
postgresql-6f9ee74d45aa7c1836b6c12b6e2a958327c16ab5.zip
Improve handling of psql \watch's interval argument
A failure in parsing the interval value defined in the \watch command was silently switched to 1s of interval between two queries, which can be confusing. This commit improves the error handling, and a couple of tests 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 interval of time between two queries in a \watch loop. No backpatch is done, as it could break existing applications. Author: Andrey Borodin Reviewed-by: Kyotaro Horiguchi, Nathan Bossart, Michael Paquier Discussion: https://postgr.es/m/CAAhFRxiZ2-n_L1ErMm9AZjgmUK=qS6VHb+0SaMn8sqqbhF7How@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
0 files changed, 0 insertions, 0 deletions