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

From D'Arcy J.M. Cain
Subject Re: New version of money type
Date
Msg-id 20060914111214.d9ba7dba.darcy@druid.net
Whole thread Raw
In response to Re: New version of money type  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: New version of money type  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: New version of money type  (Stephen Frost <sfrost@snowman.net>)
Re: New version of money type  (Josh Berkus <josh@agliodbs.com>)
Re: New version of money type  ("Jim C. Nasby" <jimn@enterprisedb.com>)
List pgsql-hackers
On Thu, 14 Sep 2006 07:59:07 -0700
"Joshua D. Drake" <jd@commandprompt.com> wrote:
> D'Arcy J.M. Cain wrote:
> > For years I have been promising that a 64 bit version of the money type
> > was on the way.  Here it is.  So far it compiles and I have done some
> > basic testing on it and it seems to work fine.  Note that the currency
> > symbol is also dropped on output as well but it is accepted on input.
> 
> Not to come down on your hard work, but isn't the money type deprecated?

Not by me.  :-)

The biggest argument about the money type is that it has an unrealistic
limit.  With this change we can go to almost one hundred thousand
trillion dollars.  That should handle even the US federal budget for a
few more years.

The benefit of the money type is speed.  Because internal operations
are done on integers they can generally be handled by single CPU ops.
My tests on the 64 bit version show 10% to 25% improvement over numeric
for many operations.

-- 
D'Arcy J.M. Cain <darcy@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-hackers by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Release notes
Next
From: Gregory Stark
Date:
Subject: Re: CSStorm occurred again by postgreSQL8.2