pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Anton Voloshin <a.voloshin@postgrespro.ru>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Aleksander Alekseev <aleksander@timescale.com>
Subject: Re: pgsql: psql: add an optional execution-count limit to \watch.
Date: Thu, 25 Apr 2024 22:20:47 -0400
Message-ID: <4051932.1714098047@sss.pgh.pa.us> (raw)
In-Reply-To: <5ed7d3e2-ca7e-40ad-9de9-e7648576cc01@postgrespro.ru>
References: <E1pkTFl-001hzA-LR@gemulon.postgresql.org>
	<CAPpHfdv+10Uk6FWjsh3+ju7kHYr76LaRXbYayXmrM7FBU-=Hgg@mail.gmail.com>
	<2929174.1680876023@sss.pgh.pa.us>
	<CAPpHfdtgQVRZOwov-Ei4Rh=gQtFE8Hb9uKkO1d_XYmQ2XEXt0g@mail.gmail.com>
	<CAJ7c6TO9KpYYxoVVseWEQB5KtjWDkt8NfyAeKPcHoe2Jq+ykpw@mail.gmail.com>
	<4032363.1681134882@sss.pgh.pa.us>
	<CAJ7c6TOFPoHVSxaQXfbm38_QN1v4qaugZW0LBTB-Gkvk2UwBQw@mail.gmail.com>
	<4076950.1681139381@sss.pgh.pa.us>
	<CAJ7c6TOVFT0bOEunovQAmZJDiLJ7Dds4YSONi4yOS1GYLvNntA@mail.gmail.com>
	<2748103.1681839252@sss.pgh.pa.us>
	<5ed7d3e2-ca7e-40ad-9de9-e7648576cc01@postgrespro.ru>

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





view thread (17+ messages)  latest in thread

Message-ID: <4051932.1714098047@sss.pgh.pa.us>
Permalink:  ../4051932.1714098047@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4051932.1714098047@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, a.voloshin@postgrespro.ru, pgsql-hackers@postgresql.org, aekorotkov@gmail.com, andrew@dunslane.net, aleksander@timescale.com
  Subject: Re: pgsql: psql: add an optional execution-count limit to \watch.
  In-Reply-To: <4051932.1714098047@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox