Skip site navigation (1) Skip section navigation (2)

Re: Bug when retrieving money datatype.

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mikko Tiihonen <mikko(dot)tiihonen(at)nitorcreations(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug when retrieving money datatype.
Date: 2011-11-30 23:46:47
Message-ID: 4ED6C067.3070904@ringerc.id.au (view raw or flat)
Thread:
Lists: pgsql-jdbc
On 11/30/2011 10:36 PM, Tom Lane wrote:
> Mikko Tiihonen<mikko(dot)tiihonen(at)nitorcreations(dot)com>  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

In response to

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2011-12-01 00:55:13
Subject: Re: Java LISTEN/NOTIFY client library work-around
Previous:From: Joel JacobsonDate: 2011-11-30 20:13:25
Subject: Re: Java LISTEN/NOTIFY client library work-around

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group