Re: dividing money by money

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: dividing money by money
Дата
Msg-id 4C417F4402000025000337E9@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: dividing money by money  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: dividing money by money  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> wrote:
> I read most of these messages rather as advocating the use of
> NUMERIC.
Yeah, I did advocate that at first, but became convinced float8 was
more appropriate.
> Also, the multiplication problem can be addressed by adding a
> money * numeric operator.
True.  If we added money * numeric, then it would make more sense to
have money / money return numeric.  On the other hand, I couldn't
come up with enough use cases for that to feel that it justified the
performance hit on money / money for typical use cases -- you
normally want a ratio for things where float8 is more than
sufficient; and you can always cast the arguments to numeric for
calculations where the approximate result isn't good enough. 
Basically, once we agreed to include casts to and from numeric, it
seemed to me we had it covered.
We're certainly in much better shape to handle exact calculations
now that we have the casts than we were before.
-Kevin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: dividing money by money
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SHOW TABLES