Re: Mapping Java BigDecimal - Mailing list pgsql-jdbc

From Jakub Bednář
Subject Re: Mapping Java BigDecimal
Date
Msg-id 4B542920.6070600@b2bcentrum.cz
Whole thread Raw
In response to Re: Mapping Java BigDecimal  (John R Pierce <pierce@hogranch.com>)
List 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.

pgsql-jdbc by date:

Previous
From: John R Pierce
Date:
Subject: Re: Mapping Java BigDecimal
Next
From: Guillaume Cottenceau
Date:
Subject: Re: 8.3 build 605 downloads broken?