BUG #15434: NUMERIC without any precision or scale truncates scale to16 digits
В списке pgsql-bugs по дате отправления:
| От | PG Bug reporting form |
|---|---|
| Тема | BUG #15434: NUMERIC without any precision or scale truncates scale to16 digits |
| Дата | |
| Msg-id | 15434-ced1c3ccf8209dc5@postgresql.org обсуждение исходный текст |
| Ответы |
Re: BUG #15434: NUMERIC without any precision or scale truncates scale to 16 digits
|
| Список | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 15434
Logged by: Andrey L
Email address: parihaaraka@gmail.com
PostgreSQL version: 10.5
Operating system: Ubuntu 16.04
Description:
# select
1800000000000000001::numeric / (10^18)::numeric truncated, -- truncates to
16 digits after decimal point
1800000000000000001::numeric(48,18) / (10^18)::numeric correct,
1800000000000000001::numeric / (10^18)::numeric * (10^18)::numeric
to_be_sure;
truncated | correct | to_be_sure
--------------------+----------------------+--------------------------------------
1.8000000000000000 | 1.800000000000000001 |
1800000000000000000.0000000000000000
(1 row)
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера