query SQL Server from PostgreSQL query SQL Server from PostgreSQL postgresql postgresql

query SQL Server from PostgreSQL


In addition to the standard but immature SQL/MED and foreign data wrappers mentioned by @vyegorov, the traditional solution to this problem has been DBI-Link, a set of foreign data mapping functions that use Perl DBI via plperl.

http://pgfoundry.org/projects/dbi-link/


There is a SQL/MED extension that describes how database can access external data.

PostgreSQL supports this part of the standard via the Foreign Data Wrappers. The linked page describes all (well, almost all I suppose) FDWs that are available now. I think that your finding on odbc_fdw are correct, but I admit, that it is not always straightforward to make FDWs working, especially on Windows.

You can take a look at Multicorn if you're familiar with Python.