Jdbc4ResultSet getClob and getBlob are calling getLong internally

From: Nedim Cholich <nedim(at)cholich(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Jdbc4ResultSet getClob and getBlob are calling getLong internally
Date: 2010-02-01 18:53:37
Message-ID: 2f8a6c901002011053w4ec6425bodb502c67d4e2b2dc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Server 8.4 on Ubuntu
Driver type 4 version 8.4-701

After getting 'org.postgresql.util.PSQLException: Bad value for type
long' I found these two methods in Jdbc4ResultSet:

public java.sql.Clob getClob(int i) throws SQLException
{
checkResultSet(i);
if (wasNullFlag)
return null;

return new Jdbc4Clob(connection, getLong(i));
}

public java.sql.Blob getBlob(int i) throws SQLException
{
checkResultSet(i);
if (wasNullFlag)
return null;

return new Jdbc4Blob(connection, getLong(i));
}

Calling getLong here has to be wrong?

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2010-02-01 20:15:52 Re: Jdbc4ResultSet getClob and getBlob are calling getLong internally
Previous Message Richard Troy 2010-01-31 05:38:08 Re: driver initialization and connection separation