Re: New version of money type - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: New version of money type
Date
Msg-id 20060928194208.GC16473@svana.org
Whole thread Raw
In response to Re: New version of money type  ("Luke Lonergan" <llonergan@greenplum.com>)
Responses Re: New version of money type  ("Luke Lonergan" <llonergan@greenplum.com>)
List pgsql-hackers
On Thu, Sep 28, 2006 at 11:57:10AM -0700, Luke Lonergan wrote:
> Got it - so the performance benefits of the fixed point versus Numeric are:
>
> - Smaller size of fixed point (less than half)
> - Faster arithmetic operations
>
> These should be quantified, so that we can evaluate Money64 as a proposal
> and to understand Numeric better.

However, none of this seems to deal with the major problems with the
money type right now:

- Only supports one currency (dollars)
- Only supports one scale (yen has no decimal normally, but what if you
want to track hundredths of a dollar-cent?)

My question, what is this Money64 type buying you over just storing an
integer in your database? There should be some value-add somewhere, but
what is it?

I've written applications tracking money using just an integer, if
there were a special money type, I'd expect it to do something more.

Have a ncie day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Kris Jurka
Date:
Subject: Re: JAVA Support
Next
From: "Magnus Hagander"
Date:
Subject: Re: JAVA Support