From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Lillywhite <mark@plasticsoftware.com.au>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] JDBC: BigDecimal and Money confusion
Date: Sat, 18 Sep 1999 10:30:11 -0400
Message-ID: <13336.937665011@sss.pgh.pa.us> (raw)
In-Reply-To: <37E33854.715C30AE@plasticsoftware.com.au>
Mark Lillywhite <mark@plasticsoftware.com.au> 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.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, mark@plasticsoftware.com.au
Subject: Re: [INTERFACES] JDBC: BigDecimal and Money confusion
In-Reply-To: <13336.937665011@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox