From: | "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net> |
---|---|
To: | josh(at)agliodbs(dot)com, ddurst(at)larubber(dot)com, <pgsql-sql(at)postgresql(dot)org> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [SQL] Function for adding Money type |
Date: | 2003-01-26 13:53:21 |
Message-ID: | 200301260853.21987.darcy@druid.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
On Friday 24 January 2003 19:17, Josh Berkus wrote:
> The MONEY type is depreciated, and should have been removed from the
> Postgres source but was missed as an oversight. Use NUMERIC instead.
Note that not all of us agree. I had to change all of our fields from MONEY
to NUMERIC recently because of the lack of support for MONEY but I would
prefer to see it improved instead. Now that we have changed we find that we
need to create a new table for balances driven by a trigger because
calculating balances just went up in cost with that change. The reason is
simply that MONEY used nothing but integer arithmetic and NUMERIC has to do a
lot more processing in code.
This year, my team is planning on improving the MONEY type. Of course, we can
always make it a user defined type if PostgreSQL doesn't want it. We will at
least put it into contrib. However, if people think that it is useful and
want to leave it in the main tree that's good too. What we want to do is a)
switch to a 64 bit integer from a 32 bit integer in order to hold amounts of
any reasonabe size and b) allow it to be cast to and from more types.
Perhaps we can also add the ability to specify the number of decimal places
on output but I am not sure if that would affect the primary benefit of using
it, speed.
--
D'Arcy J.M. Cain <darcy(at){druid|vex}.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.
From | Date | Subject | |
---|---|---|---|
Next Message | mlw | 2003-01-26 14:47:34 | Re: Have a PG 7.3.1 Windows (cygwin) easy installer... now |
Previous Message | Justin Clift | 2003-01-26 13:50:41 | Re: Win32 port patches submitted |
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Elphick | 2003-01-26 16:03:00 | Re: [SQL] Function for adding Money type |
Previous Message | Thomas Good | 2003-01-26 13:48:01 | Re: [SQL] Function for adding Money type |