Re: Formatting query output - Mailing list pgsql-general

From Peter Gibbs
Subject Re: Formatting query output
Date
Msg-id 00be01c27f37$3752d760$0b01010a@emkel.co.za
Whole thread Raw
In response to Formatting query output  (Pedro Miguel Frazao Fernandes Ferreira <pfrazao@ualg.pt>)
List pgsql-general
Pedro Miguel Frazao Fernandes Ferreira wrote:
> select real8 from test;
>          real8
> ---------------------
>   4.5035996273705e+15

The conversion from float8 to text occurs in the float8out function,
defined in src/backend/utils/adt/float.c, using:
   sprintf(ascii, "%.*g", DBL_DIG, num)
The value of DBL_DIG is defined in the standard include file <float.h>
and typically has a value of 15. I would not recommend changing this
value in <float.h>, but you could redefine it in float.c, or just change the
sprintf to use a hardcoded value of 16, and recompile and reinstall.
--
Peter Gibbs
EmKel Systems



pgsql-general by date:

Previous
From: Philip Rhoades
Date:
Subject: Functions resembling stored procedures with Crystal Reports
Next
From: ghinchliffe@vianetworks.co.uk
Date:
Subject: DAFS?