This PostgreSQL extension implements a Foreign Data Wrapper (FDW) for remote databases using Open Database Connectivity(ODBC): http://msdn.microsoft.com/en-us/library/ms714562(v=VS.85).aspx
To build the code, you need to have one of the ODBC driver managers installed on your computer.
A list of driver managers is available here: http://en.wikipedia.org/wiki/Open_Database_Connectivity
Once that's done, the extension can be built with:
PATH=/usr/local/pgsql91/bin/:$PATH make USE_PGXS=1 make sudo PATH=/usr/local/pgsql91/bin/:$PATH make USE_PGXS=1 install
(assuming you have PostgreSQL 9.1 in /usr/local/pgsql91).
I've tested on Mac OS X 10.6 and Windows 7. More testings on other platforms are coming soon.
I will test against other platforms with different driver managers and more foreign DBMS's.
The following parameters can be set on ODBC foreign server:
dsn: The Database Source Name for the foreign database system you're connecting to.
Default:
The following parameter can be set on a ODBC foreign table:
database: The name of the database to query.
Default:
schema: The schema of the database to query.
Default:
table: The name of the table to query.
Default:
sql_query: Optional: User defined SQL statement for querying the foreign table.
Default:
sql_count: Optional: User defined SQL statement for counting number of records in the foreign table.
Default: