Re: Mapping Java BigDecimal

From: Jakub Bednář <jakub(dot)bednar(at)b2bcentrum(dot)cz>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Mapping Java BigDecimal
Date: 2010-01-18 09:25:52
Message-ID: 4B542920.6070600@b2bcentrum.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

John R Pierce wrote:
> Jakub Bednář wrote:
>> Hi All,
>>
>> We decide add support PostgreSQL database (now supporting only Oracle
>> database) to our product.
>>
>> In Oracle we mapping Java BigDecimal to number(19, 2), in PostgreSQL
>> to numeric(19, 2).
>>
>> If I store to "BigDecimal column" number without decimal, e.g. "3",
>> than Oracle JDBC driver return "3", but PostgreSQL JDBC driver return
>> "3.00".
>
> does a java BigDecimal number have a fixed 2 digit fraction precision
> like that? If not, why not just define it as NUMERIC and let the
> fractional part 'float' as assigned. ?
>
>
>
>
No. Two digit fraction was example. I'll fix it by using map BigDecimal
to numeric without specify precision and scale.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Brad Milne 2010-01-18 10:06:00 Re: 8.3 build 605 downloads broken?
Previous Message Guillaume Cottenceau 2010-01-18 09:25:19 Re: 8.3 build 605 downloads broken?