Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s0BDt-001fzh-Vr for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Apr 2024 02:22:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s0BCr-005NdW-VJ for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Apr 2024 02:20:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s0BCr-005NdN-LS for pgsql-hackers@lists.postgresql.org; Fri, 26 Apr 2024 02:20:58 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s0BCo-0006Rx-JT for pgsql-hackers@postgresql.org; Fri, 26 Apr 2024 02:20:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 43Q2Klvr4051933; Thu, 25 Apr 2024 22:20:48 -0400 From: Tom Lane To: Anton Voloshin cc: Pg Hackers , Alexander Korotkov , Andrew Dunstan , Aleksander Alekseev Subject: Re: pgsql: psql: add an optional execution-count limit to \watch. In-reply-to: <5ed7d3e2-ca7e-40ad-9de9-e7648576cc01@postgrespro.ru> References: <2929174.1680876023@sss.pgh.pa.us> <4032363.1681134882@sss.pgh.pa.us> <4076950.1681139381@sss.pgh.pa.us> <2748103.1681839252@sss.pgh.pa.us> <5ed7d3e2-ca7e-40ad-9de9-e7648576cc01@postgrespro.ru> Comments: In-reply-to Anton Voloshin message dated "Thu, 25 Apr 2024 21:22:49 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4051931.1714098047.1@sss.pgh.pa.us> Date: Thu, 25 Apr 2024 22:20:47 -0400 Message-ID: <4051932.1714098047@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Anton Voloshin 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