Are there any way to connect PostgreSQL to SQL Server? I found this link http://pgfoundry.org/projects/dblink-tds/ but are there other ways?
Load the dblink extension into PostgreSQL. CREATE EXTENSION dblink; Create a persistent connection to a remote PostgreSQL database using the dblink_connect function specifying a connection name (myconn), database name (postgresql), port (5432), host (hostname), user (username) and password (password).
Database Link in PostgreSQL enables a database user to access a table present on a different PostgreSQL cluster. It provides a functionality in PostgreSQL similar to that of DB Link in Oracle, Linked Server in SQL Server and Federated Table in MySQL.
dblink is a module that supports connections to other PostgreSQL databases from within a database session. See also postgres_fdw, which provides roughly the same functionality using a more modern and standards-compliant infrastructure.
You might be able to do something using one of PostgreSQL's server languages, e.g. pl/pythonu. For any given query you could write a function in that language which fetches the results from the remote server, using the language's own DB access modules. So in pl/pythonu you would use a Python DB-API module for SQL Server access.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With