Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 7EE002E00F3 for ; Thu, 14 Feb 2008 08:45:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 56021-09 for ; Thu, 14 Feb 2008 08:45:08 -0400 (AST) Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id B0A012E004B for ; Thu, 14 Feb 2008 08:45:14 -0400 (AST) Received: from 219-89-39-133.dialup.xtra.co.nz ([219.89.39.133] 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 1JPdSd-0007xD-Q2; Fri, 15 Feb 2008 01:45:07 +1300 Message-ID: <47B437D8.1000804@opencloud.com> Date: Fri, 15 Feb 2008 01:45:12 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: =?ISO-8859-2?Q?Tomis=B3aw_Kity=F1ski?= CC: pgsql-jdbc@postgresql.org Subject: Re: SMALLINT vs short or... int? References: <47B4304F.5060204@wp.pl> In-Reply-To: <47B4304F.5060204@wp.pl> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/91 X-Sequence-Number: 18298 Tomisław Kityński wrote: > But when I call getObject on ResultSet instance on the the > column that is declared as SMALLINT i get an instance of Integer. The driver is behaving correctly. See table B-3 in the JDBC 3.0 specification - TINYINT, SMALLINT and INTEGER are all mapped to java.lang.Integer by ResultSet.getObject(). -O