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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: psql: add an optional execution-count limit to \watch.
Дата
Msg-id 4051932.1714098047@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: psql: add an optional execution-count limit to \watch.  (Anton Voloshin <a.voloshin@postgrespro.ru>)
Ответы Re: pgsql: psql: add an optional execution-count limit to \watch.  (Anton Voloshin <a.voloshin@postgrespro.ru>)
Список pgsql-hackers
Anton Voloshin <a.voloshin@postgrespro.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Index access method not receiving an orderbys ScanKey
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: New GUC autovacuum_max_threshold ?