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

MS SQL column of type nvarchar(max) fails to import (maps to varchar(0)) #59

Closed
zam6ak opened this issue Mar 10, 2017 · 1 comment · Fixed by #125
Closed

MS SQL column of type nvarchar(max) fails to import (maps to varchar(0)) #59

zam6ak opened this issue Mar 10, 2017 · 1 comment · Fixed by #125

Comments

@zam6ak
Copy link

zam6ak commented Mar 10, 2017

Context

Please explain here below what you were doing when the issue happened

CREATE SCHEMA fdw;
IMPORT FOREIGN SCHEMA dbo
LIMIT TO (test1, test2)
FROM SERVER sql_server
INTO fdw
OPTIONS (
    odbc_DATABASE 'mssql_test'
)

Current Result

foreign tables fail to import

NOTICE:  Data type not supported (-2) for column description
ERROR:  length for type varchar must be at least 1
LINE 1: ..._by" integer, "user_id" integer, "description" varchar(0)...

System trying to connect to and version

MS SQL Server 2012

Additional info

It seems that nvarchar(max) on MSQ SQL server is being mapped to varchar(0) which is invalid data type....Perhaps it should just map to text ,,,,,

@rafatower
Copy link

cc/ @jgoizueta just FYI

jgoizueta added a commit that referenced this issue Sep 17, 2020
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

Successfully merging a pull request may close this issue.

2 participants