pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wim Ceulemans <wim.ceulemans@nice.be>
To: pgsql-interfaces@postgresql.org
Subject: getObject and SMALLINT (JDBC)
Date: Wed, 10 Nov 1999 09:28:56 +0100
Message-ID: <38292CC8.F96A6BA8@nice.be> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <38292CC8.F96A6BA8@nice.be>
Permalink:  ../38292CC8.F96A6BA8@nice.be/
Also on:    postgresql.org/message-id/38292CC8.F96A6BA8@nice.be

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: wim.ceulemans@nice.be
  Subject: Re: getObject and SMALLINT (JDBC)
  In-Reply-To: <38292CC8.F96A6BA8@nice.be>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox