Re: dividing money by money

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andy Balholm <andy(at)balholm(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: dividing money by money
Date: 2010-07-18 09:00:33
Message-ID: 1279443633.30539.9.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

On lör, 2010-07-17 at 07:20 -0700, Andy Balholm wrote:
> On Jul 17, 2010, at 3:20 AM, Peter Eisentraut wrote:
>
> > 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.00 / 3.00 = 0.333333333333333333333333333333333333333333333333...

By that reasoning, numeric / numeric should also yield float.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2010-07-18 09:04:11 Re: dividing money by money
Previous Message Peter Eisentraut 2010-07-18 08:40:15 Re: Functional dependencies and GROUP BY

Browse pgsql-www by date

  From Date Subject
Next Message Peter Eisentraut 2010-07-18 09:04:11 Re: dividing money by money
Previous Message Kevin Grittner 2010-07-17 15:00:36 Re: dividing money by money