| От | Tom Lane |
|---|---|
| Тема | Re: Purpose of rscale/dscale in NUMERIC? |
| Дата | |
| Msg-id | 22198.1033565389@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Purpose of rscale/dscale in NUMERIC? (Jan Wieck <JanWieck@Yahoo.com>) |
| Список | pgsql-hackers |
Jan Wieck <JanWieck@Yahoo.com> writes:
> Tom Lane wrote:
>> What is the reason for maintaining separate rscale and dscale values in
>> numeric variables?
> You need to carry around a decent number of digits when you divide
> already. Exposing them in a manner that numericcol(15,2) / 3.0 all of
> the sudden displays 16 or more digits isn't much more intuitive. But
> carrying around only 2 here leads to nonintuitively fuzzy results on the
> other hand.
Certainly you need extra guard digits while you do the calculation.
What I'm wondering is why the delivered result would have hidden digits
in it. If they're accurate, why not show them? If they're not accurate
(which they're not, at least in the case I showed) why is it a good idea
to let them escape?
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера