Re: double precisoin type - Mailing list pgsql-hackers

From Tom Lane
Subject Re: double precisoin type
Date
Msg-id 2873832.1709309576@sss.pgh.pa.us
Whole thread Raw
In response to double precisoin type  (Fabrice Chapuis <fabrice636861@gmail.com>)
List pgsql-hackers
Fabrice Chapuis <fabrice636861@gmail.com> writes:
> Documentation says:
> double precision 8 bytes variable-precision, inexact 15 decimal digits
> precision

The documentation is stating the minimum number of decimal digits
that will be accurately reproduced.  You got 16 reproduced correctly
in this example, but you were lucky.

float8out has a different rule, which is to emit enough digits to
describe the actually-stored binary value unambiguously, so that
dump and reload will not change the stored value.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: POC, WIP: OR-clause support for indexes
Next
From: "Tristan Partin"
Date:
Subject: Re: make BuiltinTrancheNames less ugly