Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id EAD486334EE for ; Mon, 25 May 2009 12:48:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 63288-04 for ; Mon, 25 May 2009 12:48:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from n72.bullet.mail.sp1.yahoo.com (n72.bullet.mail.sp1.yahoo.com [98.136.44.34]) by mail.postgresql.org (Postfix) with SMTP id 2C72F632D73 for ; Mon, 25 May 2009 12:48:08 -0300 (ADT) Received: from [69.147.84.145] by n72.bullet.mail.sp1.yahoo.com with NNFMP; 25 May 2009 15:48:06 -0000 Received: from [69.147.65.166] by t8.bullet.mail.sp1.yahoo.com with NNFMP; 25 May 2009 15:48:06 -0000 Received: from [127.0.0.1] by omp501.mail.sp1.yahoo.com with NNFMP; 25 May 2009 15:48:06 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 758245.7936.bm@omp501.mail.sp1.yahoo.com Received: (qmail 91870 invoked by uid 60001); 25 May 2009 15:48:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1243266486; bh=n2R7hH93PKqcJ8RvYrC6esXB+DmIDOZLKysrE3fIPxM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=fCwAcAQgolT2g71Q4R0YRHK+xz7pLOjwfkQvhd2KFqGP5PgkKCOq6Q3tPQ3nxTKy4cy5tlcl3za9pfiHxZiEQ94bifc4I4un8xwDFXzRyA/xIZ0m3H4f++YgI0ASsBGrZwn7EVZG5gb/1TRy2qbqDcvDSqjlP8E4I/X6A6AGLjI= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=TxkNMO1bjLS73hibAdcRWkFVwOE4nMSYuPrCVWGV0GYdPXmADSisYDcsmfWd1DzIj+78NPOOAACqIkyqrOwsvkrCKEUgFq7rU32LcpP6yWHRQZJJQVmWGdCEYOqYB6/zHvVvEwJJb5mWF+s9kjMrO2nGYTZ06RNS5r3fqAPr1RE=; Message-ID: <402220.85531.qm@web45113.mail.sp1.yahoo.com> X-YMail-OSG: rio1Bx8VM1niSnQ90tyyvhx2m4GnKCoN3ZXFNvzfcLD1.0XOURvA2eMfVPPg0c.drOQKUNnFRCVixpwJQm3urDfeRivgGNTBFHDjgyJUtsXVmIy_EcLkadYxDSHQsID7CwGCWc1Q1DNPEPxvZx6ntms4apKxtVMfX_mgxCP1n.2CcsBVRVm1dkVd8.Fx.2dT6TUJDgHRylBDN.ZrGmuu_dKUO4VafAP.BORh9762gwxENO2Ierb4jgUqM4h4kgnOGrV21bSPofeAiLe7HfV_r6In4hYq_y2V3zI3ohA7br7um3Wbh1P5hW3r4uFdZ3mkrW9E_yJqZa6eMWKnReYeHQqWWXiP Received: from [207.164.182.8] by web45113.mail.sp1.yahoo.com via HTTP; Mon, 25 May 2009 08:48:06 PDT X-Mailer: YahooMailClassic/5.3.9 YahooMailWebService/0.7.289.10 Date: Mon, 25 May 2009 08:48:06 -0700 (PDT) From: Ioana Danes Subject: Re: jdbc rounding value for numeric fields To: Tom Lane Cc: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200905/101 X-Sequence-Number: 19651 Thank you Tom,=0A=0AMy problem could be fixed with BigDecimal...=0A=0A=0A--= - On Mon, 5/25/09, Tom Lane wrote:=0A=0A> From: Tom Lan= e =0A> Subject: Re: [JDBC] jdbc rounding value for numer= ic fields=0A> To: "Ioana Danes" =0A> Cc: pgsql-jdbc= @postgresql.org=0A> Received: Monday, May 25, 2009, 11:15 AM=0A> Ioana Dane= s =0A> writes:=0A> >=A0 =A0 =A0 =A0 =A0 =A0=0A> ps.= setDouble(1,2.6999999999999997);=0A> =0A> Don't use setDouble.=A0 float8 to= numeric conversion=0A> only preserves=0A> DBL_DIG (ie, 15 on standard plat= forms) decimal digits,=0A> since that's=0A> the most that can be fully trus= ted in a float8 value.=0A> =0A> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=0A> regards, = tom lane=0A> =0A=0A=0A _______________________________________________= ___________________=0ALooking for the perfect gift? Give the gift of Flickr= ! =0A=0Ahttp://www.flickr.com/gift/