Aug 28, 2010 4:44 PM
org.netezza.util.PSQLException: Unable to fathom update count INSERT 0 15392518151
-
Like (0)
Hello,
I doint a rather large insert, and I'm received the following error. I was wondering what the cause was. I have searched the forum and couldn't find any reference.
org.netezza.util.PSQLException: Unable to fathom update count INSERT 0 15392518151
at org.netezza.core.QueryExecutor.receiveCommandStatus(Unknown Source)
at org.netezza.core.QueryExecutor.newResultSet(Unknown Source)
at org.netezza.core.QueryExecutor.execute(Unknown Source)
at org.netezza.jdbc1.AbstractJdbc1Connection.ExecSQL(Unknown Source)
at org.netezza.jdbc1.AbstractJdbc1Statement.execute(Unknown Source)
at org.netezza.jdbc2.AbstractJdbc2Statement.execute(Unknown Source)
at org.netezza.jdbc1.AbstractJdbc1Statement.execute(Unknown Source)
Thanks
Shawn
There is a knowledge base article regarding this on the Netezza support portal, details as follows:
If one runs a INSERT, UPDATE, CREATE AS SELECT via JDBC and the number of rows INSERTed, UPDATEd or CREATEd exceeds 2147483647, then one will receive an error message similar to the following:
Unable to fathom update count INSERT 0 5120000160
the above error message may be different given whether an INSERT, UPDATE or CREATE as SELECT and given the number of rows actually effected.
This is a limitaion of JDBC specification itself.
Everytime the query of type INSERT, UPDATE, CREATE AS SELECT is fired, the back end sends a status string which contains the number of rows that are affected due to the query fired. JDBC driver stores this number as an update count. Whenever the application calls the method Statement.getUpdateCount() this number is returned.
According to JDBC specifications this number should be an integer. In JAVA the maximum value for an integer is '2147483647', so whenever back end sends the number greater than this number. JDBC driver fails to cast the number sent by back end to an integer and throws an error saying 'Unable to fathom update count <status string>'.
However, it should be noted that the INSERT, UPDATE, CREATE AS SELECT did in fact correctly effect all effected rows for the given table.
The only error is that JDBC was not capable of displaying the number of rows effected.
Thank you for you quick response.

