Small bug: In 9.2-1000, PreparedStatement.toString shows byte[].toString for int types - Mailing list pgsql-jdbc

From Larry Reeder
Subject Small bug: In 9.2-1000, PreparedStatement.toString shows byte[].toString for int types
Date
Msg-id CADO6nCgmcrauuoSRNKiP0FcxF0BNg-dU-tVD0rWSmiVmvPNtfQ@mail.gmail.com
Whole thread Raw
List pgsql-jdbc
Low priority (for me at least), but the PreparedStatement.toString for
the most recent version of the driver looks funny when it prints a
prepared statement that has an Int parameter.   Looks like the integer
is stored as a byte array, and the code just does a toString on the
byte array.

Tested with 9.2-1000:


            //normal connection setup stuff here...

            PrepartedStatement statement =
connection.prepareStatement("update foobar set name = ?, count = ?");
            statement.setString(1, "bazz");
            statement.setInt(2, 20);

            System.out.println("Statement is: " + statement.toString());

Prints out:

"Statement is:   update foobar set name = 'bazz', count = '[B@19b8e059'"



Thanks..............            Larry


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: JDBC4 Postgresql Driver
Next
From: Craig Ringer
Date:
Subject: Re: JDBC4 Postgresql Driver