Re: Strange results when casting string to double

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Strange results when casting string to double
Дата
Msg-id 59632509-6ead-bdaa-8ee4-035db22e530d@gmx.net
обсуждение исходный текст
Ответ на Strange results when casting string to double  (Carsten Klein <c.klein@datagis.com>)
Ответы Re: Strange results when casting string to double  (Carsten Klein <c.klein@datagis.com>)
Список pgsql-general
Carsten Klein schrieb am 16.02.2022 um 14:27:
> 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:
>
> SELECT 1.56::double precision;
>
> --> 1.55999999999999   (wrong!)
>
> Although I do not find any differences in configuration, on all other servers the result looks like this (correct?):
>
> SELECT 1.56::double precision;
>
> --> 1.56               (correct!)
>

I wonder if extra_float_digits is different between those  systems
Maybe initialized by differently configured SQL clients.



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

Предыдущее
От: Carsten Klein
Дата:
Сообщение: Re: Strange results when casting string to double
Следующее
От: celati Laurent
Дата:
Сообщение: Give default privileges to another SuperUser ?