Re: Strange results when casting string to double

Поиск
Список
Период
Сортировка
От Carsten Klein
Тема Re: Strange results when casting string to double
Дата
Msg-id 6593fee3-477b-6069-f91e-79f91075808f@datagis.com
обсуждение исходный текст
Ответ на Re: Strange results when casting string to double  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Strange results when casting string to double  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Strange results when casting string to double  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список 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



В списке pgsql-general по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: pg_upgrade from Postgresql-12 to Postgresql-13 fails with "Creating dump of database schemas postgres *failure*"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Strange results when casting string to double