Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4B5C6475AA1; Sun, 26 Jan 2003 11:03:17 -0500 (EST) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by postgresql.org (Postfix) with ESMTP id 60B6B474E5C; Sun, 26 Jan 2003 11:03:16 -0500 (EST) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by anchor-post-32.mail.demon.net with esmtp (Exim 3.35 #1) id 18cpFc-000JaN-0W; Sun, 26 Jan 2003 16:03:20 +0000 Received: from localhost ([127.0.0.1] ident=olly) by linda.lfix.co.uk with esmtp (Exim 3.36 #1 (Debian)) id 18cpFM-00009q-00; Sun, 26 Jan 2003 16:03:00 +0000 Subject: Re: [SQL] Function for adding Money type From: Oliver Elphick To: pgsql-hackers@postgreSQL.org Cc: josh@agliodbs.com, ddurst@larubber.com, pgsql-sql@postgresql.org In-Reply-To: <200301260853.21987.darcy@druid.net> References: <34741.10.1.86.1.1043451677.squirrel@www.la-rubber.com> <200301241617.09544.josh@agliodbs.com> <200301260853.21987.darcy@druid.net> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1043596980.29189.10.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 26 Jan 2003 16:03:00 +0000 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/976 X-Sequence-Number: 34586 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. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Wash me thoroughly from mine iniquity, and cleanse me from my sin. For I acknowledge my transgressions; and my sin is ever before me. Against thee, thee only, have I sinned, and done this evil in thy sight..." Psalms 51:2-4