Open r313pp opened 5 years ago
This is (unfortunate) FreeTDS behavior. The type_code
is pulled from the DBCOL.Type
field directly in Cursor.description
here and that is source from FreeTDS's dbcolinfo
API here.
There is a 1.1 release of FreeTDS forthcoming which may include some improvements in this area, though I haven't looked to closely at what all is included. If you find a good way to get the expected types out of FreeTDS I'd be happy to include the change as this certainly isn't intended behavior from the ctds library's perspective.
There is a 1.1 release of FreeTDS forthcoming which may include some improvements in this area
I have tested it against freetds-1.1rc2 - there is no change in this behavior.
When executing select datatypes
CHAR
,NCHAR
,VARCHAR
,NVARCHAR
are returning asCHAR (type_code=47)
type withsize = actual_size * 4
. It seems like freetds issue or intended behavior, but maybe there is some way to get actual datatypes?code
output
ctds as of https://github.com/zillow/ctds/tree/9e679608557a00b994718f715e724d17eddd4735