Re: Zero-padding and zero-masking fixes for to_char(float)

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: Zero-padding and zero-masking fixes for to_char(float)
Дата
Msg-id 87r3se7403.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: Zero-padding and zero-masking fixes for to_char(float)  (Jeff Anton <antonpgsql@hesiod.org>)
Список pgsql-hackers
>>>>> "Jeff" == Jeff Anton <antonpgsql@hesiod.org> writes:
Jeff> Postgresql seems to be using the first interpretation andJeff> reporting fewer digits.  I've noticed this with
pg_dump. That aJeff> dump and restore of floating point values does not produce theJeff> same floating point values.
Tome, that is inexcusable.  UsingJeff> the -Fc format, real values are preserved.  I have a largeJeff> database of
securityprices.  I want accuracy above all.
 

-Fc doesn't do anything different with floats than text dumps do.

pg_dump (in all modes) uses the extra_float_digits setting to try and
get a value that restores exactly. There have been issues with this in
the past (the limit of extra_float_digits had to be raised from 2 to 3,
iirc), but if it's happening now then that should probably be considered
a bug.

-- 
Andrew (irc:RhodiumToad)



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

Предыдущее
От: Jeff Anton
Дата:
Сообщение: Re: Zero-padding and zero-masking fixes for to_char(float)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Zero-padding and zero-masking fixes for to_char(float)