Re: Float output formatting options

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Float output formatting options
Дата
Msg-id 18551.1036433688@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Float output formatting options  ("Pedro M. Ferreira" <pfrazao@ualg.pt>)
Список pgsql-hackers
"Pedro M. Ferreira" <pfrazao@ualg.pt> writes:
> These functions produce output with (for pair_encode):

> sprintf(str, "%.*g,%.*g", digits8, x, digits8, y);

> digits8 is defined as ,

> #define P_MAXDIG DBL_DIG
> static int      digits8 = P_MAXDIG;

> I think it would be done the same way as for float4_out and float8_out:

Yeah.  In fact I'd be inclined to remove the static variable and make
the code match float8out exactly (do "DBL_DIG + extra_float_digits").

> There a bunch of other places where output is produced. They are all 
> within #ifdef GEODEBUG / #enfif blocks. Should these be corrected the 
> same way ?

Up to you.  Personally I'd just leave them alone...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Pedro M. Ferreira"
Дата:
Сообщение: Re: Float output formatting options
Следующее
От: "Pedro M. Ferreira"
Дата:
Сообщение: Re: Float output formatting options