Re: [GENERAL] Numeric numbers

Поиск
Список
Период
Сортировка
От Олег Самойлов
Тема Re: [GENERAL] Numeric numbers
Дата
Msg-id 1504379881.18709.2.camel@mipt.ru
обсуждение исходный текст
Ответ на Re: [GENERAL] Numeric numbers  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: [GENERAL] Numeric numbers  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Sat, 2017-09-02 at 11:41 -0700, David G. Johnston wrote:
> > There is only 20 "3" after ".". Well, may be this is not a problem,
> > but
> > why are they infinite number of "0" after the point? I can write
> > even
> >
> > => select (1::numeric/3-0.33333333333333333333)*1e100000;
> >         ?column?        
> > ------------------------
> >  0.00000000000000000000
> >
> > Result the same. According to the docs: "Numeric values are
> > physically
> > stored without any extra leading or trailing zeroes."
> >
> >
> What you see on the screen is not what is physically stored.  The
> documentation about the numeric type on the server is accurate, but
> apparently the psql application takes some liberties as to what it
> chooses to display.   It's display rules for numeric don't seem to be
> user documented or configurable.
>
> David J,

What did you mean? 0.00000000000000000000 is not 0 indeed, but wrongly
show as 0. Or it's 0, but badly formated as 0.00000000000000000000?


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] Numeric numbers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Numeric numbers