Subject: pgsql: psql: Make ParseVariableDouble reject values above max

From: Daniel Gustafsson <[email-masked]>
Date: Mon, 18 May 2026 15:38:25 +0000

psql: Make ParseVariableDouble reject values above max

ParseVariableDouble missed returning false after logging an error when
the parsed value exceeded max, making the value assigned rather than
rejected.  Backpatch down to v18 where this was introduced as part of
the \WATCH_INTERVAL.

Author: Sven Klemm <[email-masked]>
Co-authored-by: Daniel Gustafsson <[email-masked]>
Reviewed-by: Daniel Gustafsson <[email-masked]>
Discussion: https://postgr.es/m/[email-masked]
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e0c641ebbf0aab219bbe5fe0ed2be4d937f1fea1

Modified Files
--------------
src/bin/psql/t/001_basic.pl | 2 ++
src/bin/psql/variables.c    | 1 +
2 files changed, 3 insertions(+)