pgsql: Fix locale-dependent test case.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix locale-dependent test case.
Date: 2023-04-07 14:35:14
Message-ID: E1pknBJ-001s7A-Cv@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix locale-dependent test case.

psql parses the interval argument of \watch with locale-dependent
strtod(). In commit 00beecfe8 I added a test case that exercises
a fractional interval, but I hard-coded 0.01 which doesn't work
in locales where the radix point isn't ".". We don't want to
change this longstanding parsing behavior, so fix the test case
to generate a suitably locale-aware spelling.

Report and patch by Alexander Korotkov.

Discussion: https://postgr.es/m/CAPpHfdv+10Uk6FWjsh3+ju7kHYr76LaRXbYayXmrM7FBU-=Hgg@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/bin/psql/t/001_basic.pl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2023-04-07 15:47:10 pgsql: Add array_sample() and array_shuffle() functions.
Previous Message Alexander Korotkov 2023-04-07 14:06:34 Re: pgsql: psql: add an optional execution-count limit to \watch.