pgsql: psql: Make ParseVariableDouble reject values above max

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: psql: Make ParseVariableDouble reject values above max
Date: 2026-05-18 15:38:25
Message-ID: E1wP02y-000A1X-36@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 <sven(at)tigerdata(dot)com>
Co-authored-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Discussion: https://postgr.es/m/CAMCrgp31p_5SDVi7dwnP39tTW5icQ0MWHA+N4kJdXgkL0PEy8w@mail.gmail.com
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(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-05-18 15:47:27 pgsql: Remove obsolete comment in AtEOXact_Inval
Previous Message Daniel Gustafsson 2026-05-18 15:38:11 pgsql: psql: Make ParseVariableDouble reject values above max