tds-fdw / tds_fdw

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

Replace all double-colon casting with CAST(...as ) #121

Closed bikethis81 closed 7 years ago

bikethis81 commented 7 years ago

Hi Geoff,

I just searched for "::" in deparse.c and replaced all remaining instances with the appropriate MS SQL server syntax for use in the CAST(...as ..) form that was begun earlier.

This fixes a few things, notably complex joins, where the printRemotePlaceholder method is called.

All my queries work with the patched code. YMMV.

Thank you so much for your work on this!

-Shane

jenkins-juliogonzalez commented 7 years ago

Can one of the admins verify this patch?

juliogonzalez commented 7 years ago

Test this please

jenkins-juliogonzalez commented 7 years ago

Test PASSed.

bikethis81 commented 7 years ago

Couldn't get the tests to pass "connect() got an unexpected keyword argument 'server'" in the mssql-tests.py Glad you got it to work Jenkins!

GeoffMontee commented 7 years ago

Thanks a lot for the patch, @bikethis81! It has been merged.