pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Lillywhite <mark@plasticsoftware.com.au>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] JDBC: BigDecimal and Money confusion
Date: Sun, 19 Sep 1999 13:48:31 +1000
Message-ID: <37E45D0F.C383CF2@plasticsoftware.com.au> (raw)
References: <13336.937665011@sss.pgh.pa.us>

Hi Tom,

> 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.

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




view thread (6+ messages)  latest in thread

Message-ID: <37E45D0F.C383CF2@plasticsoftware.com.au>
Permalink:  ../37E45D0F.C383CF2@plasticsoftware.com.au/
Also on:    postgresql.org/message-id/37E45D0F.C383CF2@plasticsoftware.com.au

 · 

reply

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: mark@plasticsoftware.com.au
  Subject: Re: [INTERFACES] JDBC: BigDecimal and Money confusion
  In-Reply-To: <37E45D0F.C383CF2@plasticsoftware.com.au>

* 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