Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGKP0-0006Gd-BS for pgsql-jdbc@arkaria.postgresql.org; Fri, 15 Mar 2013 02:29:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UGKOz-0007wT-SZ for pgsql-jdbc@arkaria.postgresql.org; Fri, 15 Mar 2013 02:29:49 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGKOz-0007wO-9L for pgsql-jdbc@postgresql.org; Fri, 15 Mar 2013 02:29:49 +0000 Received: from mail63.csoft.net ([205.205.214.4]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGKOx-0004fH-Up for pgsql-jdbc@postgresql.org; Fri, 15 Mar 2013 02:29:48 +0000 Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 608F728407; Thu, 14 Mar 2013 21:29:47 -0500 (EST) Received: by leary.csoft.net (Postfix, from userid 1112) id 20DD71FBCF; Thu, 14 Mar 2013 21:29:47 -0500 (EST) Date: Thu, 14 Mar 2013 21:29:46 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Igor Urisman cc: pgsql-jdbc@postgresql.org Subject: Re: Improper type conversion from smallint to short In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 X-Pg-Spam-Score: -4.3 (----) Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On Thu, 14 Mar 2013, Igor Urisman wrote: > Thanks, Kris. =C2=A0Not to argue... The spec you're quoting from is pre J= ava 1.1, > which is when Short was introduced. =C2=A0(Integer was in 1.0). =C2=A0Jus= t thinking... > =C2=A0That same spec recommends primitive short. =C2=A0Just sayin'. -Igor. That was just the first link I happened to find. The specs are in PDF=20 format that makes linking tough, but if you check the current spec you'll= =20 see the same table, but with this note: Note . The JDBC 1.0 specification defined the Java object mapping for the SMALLINT and TINYINT JDBC types to be Integer. The Java language did not include the Byte and Short data types when the JDBC 1.0 specification was finalized. The mapping of SMALLINT and TINYINT to Integer is maintained to preserve backwards compatibility. Kris Jurka --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc