-
Notifications
You must be signed in to change notification settings - Fork 99
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
Importing SQL Server image type into bytea max size problem #81
Comments
This is probably related to issue #40. I haven't determined why FreeTDS is capping the length of some types yet. |
Any plans for fixing this? |
I'm running into this as well, any workarounds here? |
Guys, All my blobs are retrieved as 4096 bytes length, while in remote mssql db these are larger (and differ per row). I was digging into this problem today and found a workaround. First I can see that the problematic function is: Next I found this thread: Guess what? It is working! Sample debug before: I can see in freetds NEWS file that in dblib there is: I can prepare a pull-request with this change but I want to know if this is a good solution for this and if it will be accepted... |
Hi @manio, Thanks for the excellent debugging!
Yes, it would be accepted. Thanks for the offer! |
Blob fields was truncated to 4096 because dbdatlen() was returning incorrect size without TEXTSIZE server option set properly. This commit fixes this problem, so the blobs are properly fetched and converted to PostgreSQL 'bytea' type column. Fixes tds-fdw#81
Thanks @GeoffMontee, |
I'm irrationally excited about this thanks @manio! |
Thanks for the PR, @manio! It has been merged. |
@GeoffMontee any plans for a release? @manio any way to manually do this for now until a release? |
@kevinob11 just apply a patch and build it manually - IMHO no other way around before release. Maybe a jenkins produced some binaries - but I am not sure... |
Hi,
I'm trying to import binary data held in a column in SQL Server using the image data type. I map this to bytea and it doesn't error, however, the maximum size of my data seems to be capped at 64512 bytes. Is there is a simple reason for this?
Thanks!
The text was updated successfully, but these errors were encountered: