Re: [INTERFACES] JDBC: BigDecimal and Money confusion

From: Mark Lillywhite <mark(at)plasticsoftware(dot)com(dot)au>
To:
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] JDBC: BigDecimal and Money confusion
Date: 1999-09-19 03:48:31
Message-ID: 37E45D0F.C383CF2@plasticsoftware.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi Tom,

> Mark Lillywhite <mark(at)plasticsoftware(dot)com(dot)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.

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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jens Glaser 1999-09-19 05:30:20 Re: [INTERFACES] NUMERIC/DECIMAL handling in JDBC fixed
Previous Message Lamar Owen 1999-09-19 02:40:31 Re: [INTERFACES] pgAdmin v6.5.1 Release