pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jakub Bednář <jakub.bednar@b2bcentrum.cz>
To: John R Pierce <pierce@hogranch.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Mapping Java BigDecimal
Date: Mon, 18 Jan 2010 10:25:52 +0100
Message-ID: <4B542920.6070600@b2bcentrum.cz> (raw)
In-Reply-To: <4B5425B0.5040209@hogranch.com>
References: <4B540B7D.1080306@b2bcentrum.cz>
	<4B5425B0.5040209@hogranch.com>

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.



view thread (15+ messages)  latest in thread

Message-ID: <4B542920.6070600@b2bcentrum.cz>
Permalink:  ../4B542920.6070600@b2bcentrum.cz/
Also on:    postgresql.org/message-id/4B542920.6070600@b2bcentrum.cz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: jakub.bednar@b2bcentrum.cz, pierce@hogranch.com
  Subject: Re: Mapping Java BigDecimal
  In-Reply-To: <4B542920.6070600@b2bcentrum.cz>
  References: <4B540B7D.1080306@b2bcentrum.cz> <4B5425B0.5040209@hogranch.com> <4B542920.6070600@b2bcentrum.cz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox