Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 458C563494A for ; Mon, 18 Jan 2010 05:20:19 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 48712-07-4 for ; Mon, 18 Jan 2010 09:20:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hogranch.com (hogranch.com [75.101.82.47]) by mail.postgresql.org (Postfix) with ESMTP id CC15E63587D for ; Mon, 18 Jan 2010 05:11:39 -0400 (AST) Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id o0I9BHL11152 for ; Mon, 18 Jan 2010 01:11:17 -0800 Message-ID: <4B5425B0.5040209@hogranch.com> Date: Mon, 18 Jan 2010 01:11:12 -0800 From: John R Pierce User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Mapping Java BigDecimal References: <4B540B7D.1080306@b2bcentrum.cz> In-Reply-To: <4B540B7D.1080306@b2bcentrum.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.185 tagged_above=-10 required=5 tests=BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201001/42 X-Sequence-Number: 20238 Jakub Bedn=C3=A1=C5=99 wrote: > Hi All, > > We decide add support PostgreSQL database (now supporting only Oracle=20 > database) to our product. > > In Oracle we mapping Java BigDecimal to number(19, 2), in PostgreSQL=20 > to numeric(19, 2). > > If I store to "BigDecimal column" number without decimal, e.g. "3",=20 > than Oracle JDBC driver return "3", but PostgreSQL JDBC driver return=20 > "3.00". does a java BigDecimal number have a fixed 2 digit fraction precision=20 like that? If not, why not just define it as NUMERIC and let the=20 fractional part 'float' as assigned. ?