Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKPBr-0006Ev-8L for pgsql-general@arkaria.postgresql.org; Wed, 16 Feb 2022 18:38:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nKPBp-00032R-Ls for pgsql-general@arkaria.postgresql.org; Wed, 16 Feb 2022 18:38:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKPBp-00032G-BK for pgsql-general@lists.postgresql.org; Wed, 16 Feb 2022 18:38:09 +0000 Received: from smtprelay08.ispgateway.de ([134.119.228.108]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKPBm-0001t7-Td for pgsql-general@lists.postgresql.org; Wed, 16 Feb 2022 18:38:08 +0000 Received: from [109.90.124.214] (helo=mail.office.datagis.com) by smtprelay08.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nKPBd-0003FN-Lk; Wed, 16 Feb 2022 19:37:57 +0100 Received: from localhost (intranator.datagis.local [127.0.0.1]) by localhost (Postfix) with ESMTP id 1CCDF307; Wed, 16 Feb 2022 19:38:04 +0100 (CET) X-Virus-Scanned: by Intra2net Mail Security (AVE=8.3.64.92,VDF=8.19.7.90) X-Spam-Status: X-Spam-Level: 0 Received: from [192.168.12.10] (dslb-002-205-128-037.002.205.pools.vodafone-ip.de [2.205.128.37]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: smtp-auth-user) by mail.office.datagis.com (Postfix) with ESMTPSA id DEF14243; Wed, 16 Feb 2022 19:38:01 +0100 (CET) Message-ID: Date: Wed, 16 Feb 2022 19:38:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: Strange results when casting string to double Content-Language: en-US To: Adrian Klaver , pgsql-general@lists.postgresql.org References: <0d711ac6-6975-ae07-8963-aa91c6500776@datagis.com> From: Carsten Klein Organization: DataGis In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Df-Sender: NTkwMDE1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Feb 16, 2022 at 05:46 PM Adrian Klaver wrote > On 2/16/22 05:27, Carsten Klein wrote: >> Hi there, >> >> I'm using several (now unsupported) PostgreSQL 9.3.24 servers on >> different (ancient) Ubuntu 14.04 LTS machines. On only one of those >> servers, I get strange/wrong results when converting a string into a >> double value: >> > >> Has anyone an idea of what's going on here? I know, this version is >> far from still being supported, however, there's not much real changes >> in file float.c between these versions (in other words, this may >> happen with recent versions as well?). The database instances on all >> servers are configured quite the same (more or less). > What is the more or less for the problem server? What? Didn't get that... > Are the hardware(CPU) architectures the same for all the servers? The problem server is a virtual machine (VMware). I've tested this on two other servers and do receive probably correct results. One of these is also a virtual machine (same VMware, running on different hardware), the other one is a physical box with an AMD Athlon(tm) II X4 640 64-bit processor. Customer site: Production System: VMware (ESX Host A) works as expected Testing System: VMware (ESX Host B) DOES NOT WORK as expected Our site: Development System: AMD Athlon(tm) II works as expected However, since the strtod function works correctly from my tiny C program on all these machines, I don't believe that this problem has to do with hardware or architecture. I guess, PostgreSQL dynamically links to these C library functions, right? > If not how does the problem server differ? I certainly have no idea. Actually, I don't see any more relevant differences. > Was Postgres installed from the same source/same way on all the server? PostgreSQL was installed from Ubuntu's official repositories (14.04 LTS) on all servers. -- Carsten Klein c(dot)klein(@)datagis(dot)com