-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data buffer fixes #24
Conversation
Deal with the case that the buffer for SQLGetData is too small, and also with missing trailing zeros.
To avoid loss of precision
Some types (e.g. PostGIS geometry columns which are mapped to text) may have huge sized. We now use type text for those large columns and limit the buffer size (which is no problem since GetData by parts was implemented)
* Non-supported column types (including bit-strings) are now omitted * bit(1) is interpreted as boolean * Conversion to bytea (longvarbinary) is handled properly The buf_used variable has been added to keep track of the buffer size in case of binary data (non null-terminated) so it will be available for future binary conversions.
@rafatower please review. I think review may be easier looking at each commit in isolation |
* * With options BoolsAsChar=0 this allows | ||
* preserving boolean columns from pSQL ODBC. | ||
*/ | ||
appendStringInfo(sql_type, "boolean"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentantion
please start using a linter or fomater of your choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that misalignment is due to how github handles tabs, but I sure do need a linter
My understanding is that this fixes some issues found with pg driver, right? What are the chances of breaking any of the working drivers with this patch? what can be done to mitigate that risk? |
This deals with problems found with Hive and PG (but could affect other drivers too), namely:
It has been tested with PG, MySQL and Hive. (well, binary data has not been tested with Hive, but it probably didn't work as it was) |
Fixes #23