Re: float output precision questions - Mailing list pgsql-hackers

From Pedro M. Ferreira
Subject Re: float output precision questions
Date
Msg-id 3DC16F5B.3070109@ualg.pt
Whole thread Raw
In response to Re: float output precision questions  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
Tom Lane wrote:
> 
> Bottom line: if DBL_DIG=15 and the float arithmetic is binary, then
> there are some double values that require 17 displayed digits to
> distinguish, even though not all 16-digit numbers are distinct.
> 
> So I retract my original proposal and instead suggest that we offer
> a switch to display either DBL_DIG or DBL_DIG+2 significant digits
> (and correspondingly increase the digits for float4).  The DBL_DIG+2
> case should handle the need for exact dump/reload.

Nice. This will be good for number storage purposes.

Shall it be done with two parameters, 'DOUBLE_FORMAT' and 
'SINGLE_FORMAT', with options 'SHORT' and 'LONG' controlling how the 
sprintf's are done ?

Will someone from pg-people do it or shall I do it for you ?
As I said previously, I have seen the GUC stuff and it seem's ok for me 
to do it. I really do not know if there are any restrictions on who 
implements what respecting PostgreSQL.
Tomorrow we have an holyday in Portugal and I shall leave for the whole 
week-end, but I can do it on monday.

Best regards,
Pedro M. Ferreira

> 
>             regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 
> 


-- 
----------------------------------------------------------------------
Pedro Miguel Frazao Fernandes Ferreira
Universidade do Algarve
Faculdade de Ciencias e Tecnologia
Campus de Gambelas
8000-117 Faro
Portugal
Tel./Fax:  (+351) 289 800950 / 289 819403
http://w3.ualg.pt/~pfrazao



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: float output precision questions
Next
From: Tom Lane
Date:
Subject: Re: 7.2.3 vacuum bug