PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15434
PG Version10.5
OSUbuntu 16.04
Opened2018-10-16 09:35:28+00
Reported byAndrey L
StatusWon't Fix

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15434
Logged by:          Andrey L
Email address:      (redacted)
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)

Messages

DateAuthorSubject
2018-10-16 09:35:28+00=?utf-8?q?PG_Bug_reporting_form?=BUG #15434: NUMERIC without any precision or scale truncates scale to 16 digits
2018-10-16 11:30:44+00Andrew GierthRe: BUG #15434: NUMERIC without any precision or scale truncates scale to 16 digits
2018-10-16 12:25:18+00AndreyRe: BUG #15434: NUMERIC without any precision or scale truncates scale to 16 digits