pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: D'Arcy J.M. Cain <darcy@druid.net>
To: josh@agliodbs.com, ddurst@larubber.com, <pgsql-sql@postgresql.org>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [SQL] Function for adding Money type
Date: Sun, 26 Jan 2003 08:53:21 -0500
Message-ID: <200301260853.21987.darcy@druid.net> (raw)
In-Reply-To: <200301241617.09544.josh@agliodbs.com>
References: <34741.10.1.86.1.1043451677.squirrel@www.la-rubber.com>
	<200301241617.09544.josh@agliodbs.com>

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.



view thread (7+ messages)  latest in thread

Message-ID: <200301260853.21987.darcy@druid.net>
Permalink:  ../200301260853.21987.darcy@druid.net/
Also on:    postgresql.org/message-id/200301260853.21987.darcy@druid.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: darcy@druid.net, pgsql-hackers@postgreSQL.org
  Subject: Re: [SQL] Function for adding Money type
  In-Reply-To: <200301260853.21987.darcy@druid.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox