From: | "Sergey A(dot) Sokolov" <abac(at)xtech(dot)ru> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | BIGINT <-> java.lang.String auto cast |
Date: | 2005-05-25 13:36:14 |
Message-ID: | !~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA9SYzpt7NMkKw9lNuhI5QK8KAAAAQAAAAnBWwdiZAtku5jF+VUp/+6gEAAAAA@xtech.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hello all,
I would appreciate if JDBC development team consider my message as a feature
request for Postgres JDBC 8.xx drivers.
My issue is the following: in our application we use java.lang.String for
holding Identifier values of the database objects (portability,
extensibility, etc...), while PostgreSQL schema implementation have ID
fields as BIGINT's (or BIGSERIAL's) for most of the objects. We use some
stored procedures/functions in order to access and modify the data and,
certainly, have to pass ID values there from Java.
We use "PreparedStatement.setString(index, id);"-like statements in Java for
this kind of fields and everything works fine with JDBC drivers version 7.4
-- I mean autocast works and stored procedure/function is being found and
called correctly.
When we moved to Postgres JDBC version 8.0, or 8.1dev -- we've ran into the
problem of getting exceptions like
org.postgresql.util.PSQLException: ERROR: function proc_test(character
varying) does not exist
Attached is the test case for this issue. We use PostgreSQL database server
v 8.0.2.
I don't think this new behaviour is the correct one as BIGINT can be
serialised and deserialised back to String nicely and sometimes it is the
only way of passing data in heterogeneous systems.
Thank you for your time,
Sergey A. Sokolov
xTech Ltd.
--
| E-mail: abac(at)xtech(dot)ru; URL: http://www.xtech.ru
| P.O. Box 567, Novosibirsk-117, 630117, Russia
| Tel/Fax: +7 383-2 329-658
| Our local time zone is GMT+7 (Summer time).
Attachment | Content-Type | Size |
---|---|---|
postgres-jdbc-issue.zip | application/x-zip-compressed | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Roland Walter | 2005-05-25 13:53:43 | Re: BIGINT <-> java.lang.String auto cast |
Previous Message | Dave Cramer | 2005-05-25 12:04:01 | Re: IN/OUT parameters |