Skip to content
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

Empty strings are selected as NULL #18

Closed
shawjef3 opened this issue Mar 10, 2015 · 7 comments
Closed

Empty strings are selected as NULL #18

shawjef3 opened this issue Mar 10, 2015 · 7 comments

Comments

@shawjef3
Copy link

Hello,
In SQL Server 2008 R2 I have some nvarchar fields that are nullable. When they are empty strings, they are selected as NULL in PostgreSQL.

Jeff

@shawjef3
Copy link
Author

Sorry, this is a bug in freetds that was found in 2006 and apparently never fixed.

http://sourceforge.net/p/freetds/bugs/25/

@shawjef3
Copy link
Author

After reading the thread more closely, they used stock freetds 0.64 and fixed the php library. I'll look at tds fdw to see if I can find a similar problem.

@shawjef3 shawjef3 reopened this Mar 10, 2015
@shawjef3
Copy link
Author

OK, it's not a problem with tds_fdw. I set my tds version to auto from 7.2, and empty nvarchars are coming through as empty varchars.

@shawjef3
Copy link
Author

Setting the tds version to auto caused long nvarchars to be truncated to 255 characters. Setting the tds version to 8.0 fixed the truncation, but once again empty strings are being selected as NULL.

@GeoffMontee GeoffMontee reopened this Jun 11, 2015
@GeoffMontee
Copy link
Collaborator

@GeoffMontee
Copy link
Collaborator

Fixed: b5f678c

@GeoffMontee
Copy link
Collaborator

Fixed in 1.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants