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 1nL5FN-0001A6-0D for pgsql-general@arkaria.postgresql.org; Fri, 18 Feb 2022 15:32:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nL5FL-0006Hp-Tt for pgsql-general@arkaria.postgresql.org; Fri, 18 Feb 2022 15:32:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nL5FL-0006Hg-Iu for pgsql-general@lists.postgresql.org; Fri, 18 Feb 2022 15:32:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nL5FJ-0005Zg-A8 for pgsql-general@lists.postgresql.org; Fri, 18 Feb 2022 15:32:34 +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 21IFWReL3950190; Fri, 18 Feb 2022 10:32:27 -0500 From: Tom Lane To: Carsten Klein cc: Peter Eisentraut , pgsql-general@lists.postgresql.org Subject: Re: Strange results when casting string to double In-reply-to: <4592fac1-05b2-f775-3332-c5a7d4c65b9d@datagis.com> References: <0d711ac6-6975-ae07-8963-aa91c6500776@datagis.com> <4592fac1-05b2-f775-3332-c5a7d4c65b9d@datagis.com> Comments: In-reply-to Carsten Klein message dated "Fri, 18 Feb 2022 14:55:46 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3950188.1645198347.1@sss.pgh.pa.us> Date: Fri, 18 Feb 2022 10:32:27 -0500 Message-ID: <3950189.1645198347@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Carsten Klein writes: > On 18.02.2022 13:28, Peter Eisentraut wrote: >> float8in() really just calls the operating system's strtod() function. I >> would test that one directly with a small C program. > That's what I did. Here's my small C program: (nicht lachen *g*) Yeah, you said that upthread, which makes the whole thing pretty baffling. One possible explanation is that your small program got linked against a different version of libc than what the Postgres backend is using ("ldd" would help you check that, but given the age of the Postgres installation, this seems plausible). Beyond that it's hard to think of any explanation other than hardware fault or corrupted executable. regards, tom lane