Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id C66B26350D6 for ; Wed, 5 Aug 2009 08:13:36 -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 76005-02 for ; Wed, 5 Aug 2009 11:13:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id 271E963507C for ; Wed, 5 Aug 2009 08:13:25 -0300 (ADT) Received: from 122-57-44-76.jetstream.xtra.co.nz ([122.57.44.76] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1MYeQq-00022S-G1; Wed, 05 Aug 2009 23:13:20 +1200 Message-ID: <4A79694F.9060404@opencloud.com> Date: Wed, 05 Aug 2009 23:13:19 +1200 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Sylvain Leroux CC: pgsql-jdbc@postgresql.org Subject: Re: Using BigInteger as argument to AbstractJdbc2Statement.setObject References: <4A79587F.6010603@wanadoo.fr> In-Reply-To: <4A79587F.6010603@wanadoo.fr> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.3 tagged_above=-10 required=5 tests=AWL=1.300, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/8 X-Sequence-Number: 19857 Sylvain Leroux wrote: > Moreover other scripting languages for the Java platform may exhibit the > same behavior. So, it would be great if we have support for passing > BigInteger as argument to the setObject method in prepared statements. > Even if it's not required by the JDBC API. > > Best of all, the patch is trivial as you will see: I send the result of > a ``cvs diff -u8pN'' as an attachment. Why NUMERIC instead of an integer type? Might as well make setBigInteger() private if you're not also going to expose it on PGStatement (I don't think it needs to be exposed there) Incidentally, the JDBC spec does provide a standard mapping from BigDecimal (not BigInteger) to NUMERIC. -O