Received: from chekov.Belgium.EU.net (chekov.belgium.eu.net [193.74.208.161]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA00422 for ; Wed, 10 Nov 1999 03:27:40 -0500 (EST) (envelope-from wim.ceulemans@nice.be) Received: from (IDENT:0@idialup110.brussels2.eunet.be [193.121.143.110]) by chekov.Belgium.EU.net with ESMTP id JAA02660 for ; Wed, 10 Nov 1999 09:27:30 +0100 (MET) Received: from nice.be (aladdin.nice.be [192.168.250.110]) by uni-box.nice.be (8.9.1/8.9.1) with ESMTP id JAA00870 for ; Wed, 10 Nov 1999 09:26:54 +0100 Message-ID: <38292CC8.F96A6BA8@nice.be> Date: Wed, 10 Nov 1999 09:28:56 +0100 From: Wim Ceulemans X-Mailer: Mozilla 4.61 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: getObject and SMALLINT (JDBC) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi I noticed that all jdbc drivers return the Integer java type for a SMALLINT database type. Is this intended or is this a bug? The recommendation in the JDBC book (Hamiltan, Catell, Fisher) says that SMALLINT should be mappped to the Java short type. If I want to changes this, is all I have to do is change the line in /src/interfaces/jdbc/postgresql/jdbc1/ResultSet.java from case Types.SMALLINT return new Integer(getInt(columnIndex) to case Types.SMALLINT return new Short(getShort(columnIndex) ? Regards Wim Ceulemans Nice bvba www.nice.be Eglegemweg 3, 2811 Hombeek Belgium Tel 0032-15-412953 Fax 0032-15-412954