Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DB2E44768EF; Mon, 27 Jan 2003 15:15:10 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 11BF247687C; Mon, 27 Jan 2003 15:15:05 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h0RKEvH27942; Mon, 27 Jan 2003 15:14:57 -0500 (EST) From: Bruce Momjian Message-Id: <200301272014.h0RKEvH27942@candle.pha.pa.us> Subject: Re: [SQL] Function for adding Money type In-Reply-To: <1043596980.29189.10.camel@linda.lfix.co.uk> To: Oliver Elphick Date: Mon, 27 Jan 2003 15:14:57 -0500 (EST) Cc: pgsql-hackers@postgresql.org, josh@agliodbs.com, ddurst@larubber.com, pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/1026 X-Sequence-Number: 34636 Oliver Elphick wrote: > On Sun, 2003-01-26 at 13:53, D'Arcy J.M. Cain wrote: > > > 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. > > A money type needs to specify what currency is held. The current one > changes the currency with the locale, which makes nonsense of existing > data. Agreed. We can default to locale but need a way of overriding that, ideally with atttypmod at the column level. I assume this will be done for 7.4 (you said "this year")? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073