From: | Carsten Klein <c(dot)klein(at)datagis(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Strange results when casting string to double |
Date: | 2022-02-18 17:07:35 |
Message-ID: | 6593fee3-477b-6069-f91e-79f91075808f@datagis.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-02-18 20:07:47 | Re: Strange results when casting string to double |
Previous Message | Jeff Janes | 2022-02-18 16:07:18 | Re: pg_upgrade from Postgresql-12 to Postgresql-13 fails with "Creating dump of database schemas postgres *failure*" |