Re: BUG #14138: Inconsistent rounding behavior in float4 coercion - Mailing list pgsql-bugs

From Charles
Subject Re: BUG #14138: Inconsistent rounding behavior in float4 coercion
Date
Msg-id CADBa3waX4s-B1WNe4r5tdRW7m-MbJaf1TKyU+ud4fStJCrxZOw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #14138: Inconsistent rounding behavior in float4 coercion  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I see, so the overriding, default rule in all these cases is, "convert as
many digits as will be reliable" -- as opposed to, "convert as many digits
as are needed to do a full round-trip"?

Best,
Charles

On Mon, May 23, 2016 at 10:00 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Charles <cooper.charles.m@gmail.com> writes:
> > As a follow-up question, I am a bit confused as to the following
> behavior:
> > ...
> > How come 11143.1504 is not printed in all of these cases?
>
> float4 to numeric casting doesn't honor extra_float_digits, it just
> converts as many digits as will be reliable.
>
>                         regards, tom lane
>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #14138: Inconsistent rounding behavior in float4 coercion
Next
From: Tom Lane
Date:
Subject: Re: BUG #14147: Restore of MatView of Foreign Data Table fails