pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Carsten Klein <c.klein@datagis.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Strange results when casting string to double
Date: Fri, 18 Feb 2022 18:07:35 +0100
Message-ID: <6593fee3-477b-6069-f91e-79f91075808f@datagis.com> (raw)
In-Reply-To: <3950189.1645198347@sss.pgh.pa.us>
References: <0d711ac6-6975-ae07-8963-aa91c6500776@datagis.com>
	<f3575aaf-98a8-6941-7843-ba1a0d78514f@enterprisedb.com>
	<4592fac1-05b2-f775-3332-c5a7d4c65b9d@datagis.com>
	<3950189.1645198347@sss.pgh.pa.us>




On 18.02.2022 16:32, Tom Lane wrote:
> 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.

Tom,

both PostgreSQL and my C program are linked to the same libc.so.6. Same 
path, same MD5 sum. Since libc is a Shared Object (so), both processes 
should really run the identical code. Am I missing something? I've 
written and compiled the small C program on the same old Ubuntu OS.

So, you're not aware of any ways this behavior could be achieved from 
within PostgreSQL? Something like a custom cast (actually, there is 
none) or something that could intercept string to double conversion? 
That would be something to look at closer. The question is: how would 
you implement such an evil database wide text to double conversion (just 
to kid users) if you had to?

PostgreSQL is up for more than 480 days on that server. I'm thinking of 
giving a restart of the database a try. However, there's a long running 
import taking place, so this will not happen before mid or end of next week.

Regards, Carsten





view thread (24+ messages)  latest in thread

Message-ID: <6593fee3-477b-6069-f91e-79f91075808f@datagis.com>
Permalink:  ../6593fee3-477b-6069-f91e-79f91075808f@datagis.com/
Also on:    postgresql.org/message-id/6593fee3-477b-6069-f91e-79f91075808f@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, tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com
  Subject: Re: Strange results when casting string to double
  In-Reply-To: <6593fee3-477b-6069-f91e-79f91075808f@datagis.com>
  References: <0d711ac6-6975-ae07-8963-aa91c6500776@datagis.com> <f3575aaf-98a8-6941-7843-ba1a0d78514f@enterprisedb.com> <4592fac1-05b2-f775-3332-c5a7d4c65b9d@datagis.com> <3950189.1645198347@sss.pgh.pa.us> <6593fee3-477b-6069-f91e-79f91075808f@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