Re: Mapping Java BigDecimal

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Mapping Java BigDecimal
Date: 2010-01-18 09:11:12
Message-ID: 4B5425B0.5040209@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

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