tds-fdw / tds_fdw

A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)
Other
377 stars 101 forks source link

ERROR: Unknown tds version: 7.4. #175

Closed dubox closed 5 years ago

dubox commented 6 years ago

SQL: CREATE SERVER tds_fdw_sqlserver FOREIGN DATA WRAPPER tds_fdw OPTIONS ( database 'Ornam**_Test', servername '121...170', port '1433', tds_version '7.4' );

ERROR: Unknown tds version: 7.4.

tds_fdw: 1.0.8

postgresql: PostgreSQL 10.4 (Debian 10.4-2.pgdg80+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 4.9.2-10+deb8u1) 4.9.2, 64-bit


The 7.4&7.3 are all get this error and 7.2&7.1 are ok ,but my sqlserver is ver:2012 .

THANKS!

SudoerWithAnOpinion commented 6 years ago

Support for version 7.4 was not added until 3a803c5840b8cf69e1a725fb4377d0f95a53a4e9 (version v2.0.0-alpha.2)

GeoffMontee commented 6 years ago

It looks like the 1.0 branch has a similar commit that added support for 7.4. See commit de5bf52c3aae62680da77508bed4988d2e5b0f7d

However, tds_version values 7.1 and above all have compile-time checks, so that they are only enabled when tds_fdw is built with a version of FreeTDS that supports that specific tds_version. If your tds_fdw build is rejecting tds_version values of 7.3 and 7.4, then it was probably built with a version of FreeTDS that did not support those versions. If you want to use those versions, then you may need to rebuild tds_fdw with a newer version of FreeTDS.

ghost commented 5 years ago

@dubox, the 1.0 branch now has the fix you needed (per Geoff's comment), are you still having issues? If not, can you close this issue?

SudoerWithAnOpinion commented 5 years ago

@GeoffMontee, can we close this as a stale issue?

GeoffMontee commented 5 years ago

Sure, thanks for checking in on this one. I'll go ahead and close it.