CartoDB / odbc_fdw

PostgreSQL Foreign-data Wrapper for ODBC
Other
67 stars 22 forks source link

Fix columns iteration #123

Closed jgoizueta closed 4 years ago

jgoizueta commented 4 years ago

We've had cases of empty column lists in some cases with the ODBC drivers for BigQuery and Snowflake.

After some debugging with the latter, it seems that column iteration may be interrupted by SQLFetch erros responses like these:

DEBUG:   HY000:0:6:[Snowflake][Snowflake] (6)
      Assertion failure: GEOGRAPHY_type_unsupported
DEBUG:  FETCHING HY000:2:6:[Snowflake][Snowflake] (6)
      Assertion failure: USER_DEFINED_TYPE_type_unsupported

With this patch those errors are ignored (skipping columns of unsupported types) and the iteration is resumed.