Saneesh Apte <s...@calccit.org> wrote:
 
> the base type of a boolean[] is java.sql.Types.BIT instead or 
> java.sql.Types.BOOLEAN.  At the very least shouldn't these be
> aliases for the same type?
> 
> And secondly the returned type from a smallint[] is an Integer[]
> instead of a Short[].
 
Should the objects in the array returned by getArray be typed
according to the rules of an individual value returned by getObject?
(I couldn't find anything explicit on that, but it seems
reasonable.)  If that *is* true, the controlling part of the spec
is:
 
http://java.sun.com/javase/6/docs/technotes/guides/jdbc/getstart/mapping.html#table3
 
That maps SQL types TINYINT, SMALLINT, AND INTEGER to Java Integer.
It also maps SQL BIT to Java Boolean.  The SQL type of BOOLEAN was a
latecomer to the SQL spec, and it appears that JDBC hasn't yet added
it to the mappings.
 
Do you have a reference to something which indicates that getArray
should use a different mapping?
 
Maybe someone will see it differently, but I don't think I see a bug
here.  Compliance with the spec is not a bug, even if the spec is a
bit odd....  ;-)
 
-Kevin

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to