alexbrainman / odbc

odbc driver written in go
BSD 3-Clause "New" or "Revised" License
352 stars 140 forks source link

Driver does not fetch existing record if numeric precission is high on Vertica #116

Closed adranwit closed 6 years ago

adranwit commented 6 years ago

On checking migration data between Vertica other db, I have noticed some or all record missing, I was able to pin it down to the presence of at least one column with high numeric precision

The following does not return record on ODBC driver but does on JDBC select 1.2/0.0000000000000000000000000000000000000000000000023000000643222221333333 FROM dual

alexbrainman commented 6 years ago

I use this driver with my MS SQL Server. So it cover ODBC datatypes I encounter. I wouldn't be surprised there some data types missing in my driver. Since you can easily reproduce the problem, perhaps you can debug it yourself. Let me know, if you need some help.

Alex

adranwit commented 6 years ago

On debuging it closely it looks I have not checked rows.Err(), so now it is Vertica ODBC specific error, SQLFetch: {HY000} [Vertica][Support] (40321) String value '521739115843730736978537466659130591936249623992.73255839538173980612344745449501101514675961168048412651594070203829628' resulted in an invalid numeric.