Jdbc4ResultSet getClob and getBlob are calling getLong internally - Mailing list pgsql-jdbc

From Nedim Cholich
Subject Jdbc4ResultSet getClob and getBlob are calling getLong internally
Date
Msg-id 2f8a6c901002011053w4ec6425bodb502c67d4e2b2dc@mail.gmail.com
Whole thread Raw
Responses Re: Jdbc4ResultSet getClob and getBlob are calling getLong internally  (Kris Jurka <books@ejurka.com>)
List 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?

pgsql-jdbc by date:

Previous
From: Lew
Date:
Subject: Re: driver initialization and connection separation
Next
From: Kris Jurka
Date:
Subject: Re: Jdbc4ResultSet getClob and getBlob are calling getLong internally