tds_fdw icon indicating copy to clipboard operation
tds_fdw copied to clipboard

long varchar(max) and varbinary(max) fields truncated

Open tskenb opened this issue 9 years ago • 1 comments

I have found that long strings and long byte arrays are truncated to 64512 chars/bytes when imported from SQL Server. The cause seems to be that freetds's dbdatlen function returns 64512 as the srclen. Not sure yet if this is a problem in freetds, or if dbdatlen is the wrong API to call.

Note that in their documentation Microsoft says that the storage size for varchar and varbinary is the data length + 2 bytes.

tskenb avatar Oct 22 '15 14:10 tskenb

This is probably an origin of a duplicated #81 and fixed with #294. I think it is OK to close this (and reopen if necessary)...

manio avatar Oct 16 '21 17:10 manio