Re: Function for adding Money type

Поиск
Список
Период
Сортировка
От D'Arcy J.M. Cain
Тема Re: Function for adding Money type
Дата
Msg-id 200301260853.21987.darcy@druid.net
обсуждение исходный текст
Ответ на Re: Function for adding Money type  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Function for adding Money type  (Thomas Good <tomg@sqlclinic.net>)
Re: Function for adding Money type  (Oliver Elphick <olly@lfix.co.uk>)
Список 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@{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.


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

Предыдущее
От: "David Durst"
Дата:
Сообщение: Re: ERROR: Cannot display a value of type RECORD
Следующее
От: Thomas Good
Дата:
Сообщение: Re: Function for adding Money type