Re: WIP: rewrite numeric division

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: WIP: rewrite numeric division
Дата
Msg-id 87y7heu7z8.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: WIP: rewrite numeric division  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> No, my proposed patch doesn't change that.  It might be that we should
> provide an "integer division" operator for NUMERIC, so that you can get
> at the exact result of trunc(x/y).

I was also thinking that if the denominator had only factors of 2 and 5 we
could calculate the precision to be precisely enough to maintain the original
precision. Ie, nnnn/1000 should just give you n.nnn not n.nnn0000 and more
importantly it should never round.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: Async Commit, v21 (now: v22)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Async Commit, v21 (now: v22)