Re: Mapping Java BigDecimal - Mailing list pgsql-general

From Lew
Subject Re: Mapping Java BigDecimal
Date
Msg-id hjfelt$ke8$1@news.albasani.net
Whole thread Raw
In response to Mapping Java BigDecimal  (Jakub Bednář <jakub.bednar@b2bcentrum.cz>)
List pgsql-general
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".
>
> Is there some way (mapping, server setup,...) how reach return number
> without trailing zeroes on decimal position?

There's no difference between those two values in Java's BigDecimal.

Are you saying that the 'scale' of the returned values differs between the
JDBC for Oracle and that for PG?

--
Lew

pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: Slow Query / Check Point Segments
Next
From: Dimitri Fontaine
Date:
Subject: Re: more docs on extending postgres in C