Received: from plasticsoftware.com.au (molten.plasticsoftware.com.au [203.91.232.3]) by hub.org (8.9.3/8.9.3) with SMTP id XAA71850 for ; Sat, 18 Sep 1999 23:48:36 -0400 (EDT) (envelope-from mark@plasticsoftware.com.au) Received: (qmail 24948 invoked from network); 19 Sep 1999 03:48:48 -0000 Received: from quokka.plasticsoftware.com.au (HELO plasticsoftware.com.au) (203.91.232.2) by molten.plasticsoftware.com.au with SMTP; 19 Sep 1999 03:48:48 -0000 Sender: mark Message-ID: <37E45D0F.C383CF2@plasticsoftware.com.au> Date: Sun, 19 Sep 1999 13:48:31 +1000 From: Mark Lillywhite Organization: Plastic Software X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.5-22 i586) X-Accept-Language: en MIME-Version: 1.0 CC: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] JDBC: BigDecimal and Money confusion References: <13336.937665011@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Tom, > Mark Lillywhite writes: > > (As an aside, I found the PGMoney class but it too only accepts doubles. I > > could use doubleValue() on the BigDecimal but I am worried about the loss of > > precision given my past experience. So my position is that I reckon I should > > be able to use arbitrary precision up until the database interprets it). > > Mark, I dunno what Postgres version you are using, but there is a > genuine arbitrary-precision-decimal NUMERIC type in Postgres 6.5 & up. > That's probably what you should be using. The old 'money' type is a > hack, because it overflows too easily. ($20 million ain't what it > used to be ;-).) It's now deprecated and will probably go away > entirely at some point. Thanks HEAPS for this, we were very confused about the numeric support because we were reading the documentation which indicated that there *was* a numeric type, but we were using the Postgres that comes on the RH6.0 CD, which is 6.4, and of course we couldn't get it to work - but "money" worked fine. We upgraded to 6.5 but we didn't try the numeric type. It's all just 'cos I'm new and don't know my way around the documentation/changelogs/readmes etc yet. Thanks again for your help, I guess my JDBC patch is kinda worthless then :) Cheers Mark