Fix getXXX methods when used with CHAR columns or columns with decimals - Mailing list pgsql-jdbc

From Kim Ho
Subject Fix getXXX methods when used with CHAR columns or columns with decimals
Date
Msg-id 1055958280.13891.40.camel@topanga.toronto.redhat.com
Whole thread Raw
Responses Re: Fix getXXX methods when used with CHAR columns or
List pgsql-jdbc
Problem:
 - Error parsing input in getByte() and getShort() if input has a decimal or whitespace (from CHAR columns)
 - Error parsing CHAR columns in other getXXX methods.

Fix:
 - Added trim() to getXXX methods
 - In getByte() and getShort(), check the field type and take out the decimal and everything after it. Also check for
CHARand trim if necessary. 

Cheers,

Kim



Attachment

pgsql-jdbc by date:

Previous
From: Kim Ho
Date:
Subject: Allow setObject(x,y,Types.BIT) if y is a Number & getObject() on bit columns
Next
From: Kim Ho
Date:
Subject: ToBoolean method return correct Boolean values as per JDBC spec