Re: Formatting query output

Поиск
Список
Период
Сортировка
От Peter Gibbs
Тема Re: Formatting query output
Дата
Msg-id 00be01c27f37$3752d760$0b01010a@emkel.co.za
обсуждение исходный текст
Ответ на Formatting query output  (Pedro Miguel Frazao Fernandes Ferreira <pfrazao@ualg.pt>)
Список 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 по дате отправления:

Предыдущее
От: Philip Rhoades
Дата:
Сообщение: Functions resembling stored procedures with Crystal Reports
Следующее
От: ghinchliffe@vianetworks.co.uk
Дата:
Сообщение: DAFS?