RE: [INTERFACES] getObject and SMALLINT (JDBC)

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Wim Ceulemans'" <wim(dot)ceulemans(at)nice(dot)be>, pgsql-interfaces(at)postgresql(dot)org
Subject: RE: [INTERFACES] getObject and SMALLINT (JDBC)
Date: 1999-11-10 09:14:14
Message-ID: 1B3D5E532D18D311861A00600865478C25E832@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

It's probably been like that since day one. I'll check the specs.

Peter

> -----Original Message-----
> From: Wim Ceulemans [SMTP:wim(dot)ceulemans(at)nice(dot)be]
> Sent: 10 November 1999 08:29
> To: pgsql-interfaces(at)postgreSQL(dot)org
> Subject: [INTERFACES] getObject and SMALLINT (JDBC)
>
> 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
>
> ************

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Vince Vielhaber 1999-11-10 11:22:45 Re: [HACKERS] CORBA STATUS
Previous Message Wim Ceulemans 1999-11-10 08:28:56 getObject and SMALLINT (JDBC)