Why does numeric_out produce so many trailing zeros?

Поиск
Список
Период
Сортировка
От David Rowley
Тема Why does numeric_out produce so many trailing zeros?
Дата
Msg-id CAApHDvpPn=RYYaJ1iOarpw4XHNQov-72y92QfU1KcG7e_=o1Ow@mail.gmail.com
обсуждение исходный текст
Ответы Re: Why does numeric_out produce so many trailing zeros?  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers
I've been reading the documents on numeric and I can't find any information on the reason that a query like this:

test=# select n::numeric / 1 from generate_series(1,2) s(n);
        ?column?
------------------------
 1.00000000000000000000
     2.0000000000000000
(2 rows)

produces results that have so many trailing zeros. Also I'm wondering why the first row has 20 trailing zeros and the 2nd row has just 16?

Is there any reason that we output any trailing zeros at all?

Regards

David Rowley

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: PostgreSQL Service on Windows does not start if data directory given is relative path
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Compiling extensions on Windows