Calling functions with smallint fails - Mailing list pgsql-jdbc

From Christian Niles
Subject Calling functions with smallint fails
Date
Msg-id C768B1F0-2392-11D9-83CE-000A9590B78E@unit12.net
Whole thread Raw
Responses Re: Calling functions with smallint fails
List pgsql-jdbc
I'm having problems using CallableStatement to execute a function that
has a smallint parameter. The problem I'm having is identical to this
bug report:

http://archives.postgresql.org/pgsql-bugs/2003-04/msg00060.php

 From a basic examination of the code, it seems that setShort(int,
short) simply serializes the value to a string, making it
indistinguishable from an integer. The response to that bug mentions
that the literal needs to be cast to a smallint:

http://archives.postgresql.org/pgsql-bugs/2003-04/msg00061.php

Is this a known problem with the JDBC implementation, or is this a bug
that can be fixed?

best,
christian.


pgsql-jdbc by date:

Previous
From: Christian Niles
Date:
Subject: ClassCastException in getShort(int)
Next
From: Kris Jurka
Date:
Subject: Re: Calling functions with smallint fails