Numeric Scale Differences

Поиск
Список
Период
Сортировка
От Nuno Sousa
Тема Numeric Scale Differences
Дата
Msg-id CAMZ4ZVqq9kHN7DJs5T=zL8jDJuk-3v2-spyYtjd8e2xj_OPM8Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Numeric Scale Differences  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hi all,

I've run into an interesting issue when trying to do numeric math. I expected the following to return the same number of decimal digits in the fractional part:

select scale(1/0.6::numeric), scale(1/6::numeric);

But it returns a scale of 16 and 20, respectively.

Any idea why?
--
Nuno Sousa

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Password settings requirements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Numeric Scale Differences