Re: SMALLINT vs short or... int?

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tomisław Kityński <hataraku(at)wp(dot)pl>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: SMALLINT vs short or... int?
Date: 2008-02-14 12:45:12
Message-ID: 47B437D8.1000804@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Simon Riggs 2008-02-14 13:04:19 Re: JDBC, prepared queries, and partitioning
Previous Message Oliver Jowett 2008-02-14 12:22:05 Re: JDBC, prepared queries, and partitioning