| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Mark Lillywhite <mark(at)plasticsoftware(dot)com(dot)au> |
| Cc: | pgsql-interfaces(at)postgreSQL(dot)org |
| Subject: | Re: [INTERFACES] JDBC: BigDecimal and Money confusion |
| Date: | 1999-09-18 14:30:11 |
| Message-ID: | 13336.937665011@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-interfaces |
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.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | the_one_host | 1999-09-18 17:25:33 | website hosting only $9.95/mo. |
| Previous Message | Mark Lillywhite | 1999-09-18 06:59:32 | JDBC: BigDecimal and Money confusion |