Calling functions with smallint fails

From: Christian Niles <christian(at)unit12(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Calling functions with smallint fails
Date: 2004-10-21 18:55:30
Message-ID: C768B1F0-2392-11D9-83CE-000A9590B78E@unit12.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-10-21 18:59:54 Re: Calling functions with smallint fails
Previous Message Kris Jurka 2004-10-21 18:27:48 [GENERAL] JDBC +CIDR (fwd)