pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Carsten Klein <c.klein@datagis.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Strange results when casting string to double
Date: Wed, 16 Feb 2022 19:38:01 +0100
Message-ID: <a89c2e30-3775-799b-37f0-bd07d3b7c55f@datagis.com> (raw)
In-Reply-To: <d07e34aa-0c42-f857-39d8-265d63998417@aklaver.com>
References: <0d711ac6-6975-ae07-8963-aa91c6500776@datagis.com>
	<d07e34aa-0c42-f857-39d8-265d63998417@aklaver.com>



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





view thread (24+ messages)  latest in thread

Message-ID: <a89c2e30-3775-799b-37f0-bd07d3b7c55f@datagis.com>
Permalink:  ../a89c2e30-3775-799b-37f0-bd07d3b7c55f@datagis.com/
Also on:    postgresql.org/message-id/a89c2e30-3775-799b-37f0-bd07d3b7c55f@datagis.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: c.klein@datagis.com, adrian.klaver@aklaver.com
  Subject: Re: Strange results when casting string to double
  In-Reply-To: <a89c2e30-3775-799b-37f0-bd07d3b7c55f@datagis.com>
  References: <0d711ac6-6975-ae07-8963-aa91c6500776@datagis.com> <d07e34aa-0c42-f857-39d8-265d63998417@aklaver.com> <a89c2e30-3775-799b-37f0-bd07d3b7c55f@datagis.com>

* 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