Re: pgsql: psql: add an optional execution-count limit to \watch.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Anton Voloshin <a(dot)voloshin(at)postgrespro(dot)ru>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Aleksander Alekseev <aleksander(at)timescale(dot)com>
Subject: Re: pgsql: psql: add an optional execution-count limit to \watch.
Date: 2024-04-26 02:20:47
Message-ID: 4051932.1714098047@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Anton Voloshin <a(dot)voloshin(at)postgrespro(dot)ru> writes:
> On 18/04/2023 20:34, Tom Lane wrote (on pgsql-committers):
>>> I shall now retire to a safe distance and watch the buildfarm.

> Unfortunately, on fresh perl (5.38.2 verified) and on ru_RU.UTF-8
> locale, it breaks basic float comparison: 0 < 0.5 is no longer true.

Haven't we worked around that everywhere it matters, in commits such
as 8421f6bce and 605062227? For me, check-world passes under
LANG=ru_RU, even with perl 5.38.2 (where I do confirm that your
test script fails). The buildfarm isn't unhappy either.

> Obviously, one of the reasons is that according to ru_RU.UTF-8 locale
> for LC_NUMERIC, fractional part separator is ",", not ".". So one could,
> technically, parse "0.5" as "0" and then unparsed ".5" tail. I think it
> might even be a Perl bug, because, according to my quick browsing of man
> perlfunc (setlocale) and man perllocale, this should not affect the code
> outside "use locale", not in such a fundamental way. After all, we're
> talking not about strtod etc, but about floating-point numbers in the
> source code.

I agree that it's a Perl bug, mainly because your test case doesn't
fail in Perls as recent as v5.32.1 (released about 3 years ago).
It's impossible to believe that they intentionally broke basic
Perl constant syntax now, after so many years. Particularly in
this way --- what are we supposed to do, write "if (0 < 0,5)"?
That means something else.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2024-04-26 12:49:44 pgsql: Minor fixes to pg_combinebackup and its documentation.
Previous Message Robert Haas 2024-04-25 20:05:32 pgsql: pg_combinebackup: Detect checksum mismatches and document limita

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2024-04-26 02:24:45 Re: New GUC autovacuum_max_threshold ?
Previous Message Tom Lane 2024-04-26 00:14:13 Re: Index access method not receiving an orderbys ScanKey