Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D36941842AB for ; Wed, 30 Nov 2011 19:47:07 -0400 (AST) Received: from mail-bw0-f46.google.com ([209.85.214.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RVtrn-0001Ro-SS for pgsql-jdbc@postgresql.org; Wed, 30 Nov 2011 23:47:08 +0000 Received: by bkas6 with SMTP id s6so1572101bka.19 for ; Wed, 30 Nov 2011 15:46:55 -0800 (PST) Received: by 10.204.7.81 with SMTP id c17mr1922716bkc.63.1322696814628; Wed, 30 Nov 2011 15:46:54 -0800 (PST) Received: from ayaki.localdomain (124-169-45-65.dyn.iinet.net.au. [124.169.45.65]) by mx.google.com with ESMTPS id fa8sm7359815bkc.14.2011.11.30.15.46.50 (version=SSLv3 cipher=OTHER); Wed, 30 Nov 2011 15:46:53 -0800 (PST) Message-ID: <4ED6C067.3070904@ringerc.id.au> Date: Thu, 01 Dec 2011 07:46:47 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Tom Lane CC: Mikko Tiihonen , pgsql-jdbc@postgresql.org Subject: Re: Bug when retrieving money datatype. References: <4ED5D369.30902@nitorcreations.com> <9322.1322663810@sss.pgh.pa.us> In-Reply-To: <9322.1322663810@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201111/118 X-Sequence-Number: 22453 On 11/30/2011 10:36 PM, Tom Lane wrote: > Mikko Tiihonen writes: >> I was planning to add the binary format support for money to the >> jdbc driver when I had some free time. It will solve all parsing >> problems related to locale and give nice speed boost at the same time. > I don't think that's exactly a magic bullet. Yes, it'll mean you don't > need to know the locale's currency symbol or what it uses for decimal > point, but how are you going to determine where the decimal point is > in the binary representation? You'll still be dependent on knowing the > server's lc_monetary locale. I thought `money' was due to go away at some point? Isn't it about time to start logging: WARNING: The "money" datatype is deprecated. Use NUMERIC instead. ... whenever MONEY is used in DDL? Issues like locale-dependent representation make it all the more painful, and I can't help but wonder if it's worth trying to fix it. -- Craig Ringer