Re: dividing money by money

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: dividing money by money
Дата
Msg-id 8193.1279377554@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: dividing money by money  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On fre, 2010-07-16 at 10:31 -0400, Tom Lane wrote:
>> The other argument that I found convincing was that if the
>> operator was defined to yield numeric, people might think that
>> the result was exact ... which of course it won't be, either way.
>> Choosing float8 helps to remind the user it's an approximate quotient.

> Why is it approximate?  Aren't money values really integers?

1/3 is going to yield an approximate result either way.
        regards, tom lane


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

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