tds_fdw

This Release
tds_fdw 1.0.7
Date
Status
Unstable
Latest Testing
tds_fdw 1.0.0 —
Latest Unstable
tds_fdw 2.0.0-alpha1 —
Other Releases
Abstract
TDS Foreign data wrapper
Description
This library contains a single PostgreSQL extension, a foreign data wrapper called "tds_fdw". It can be used to communicate with Microsoft SQL Server and Sybase databases.
Released By
geoffmontee
License
PostgreSQL
Resources
Special Files
Tags

Extensions

tds_fdw 2.0.0-alpha1
TDS Foreign data wrapper

Documentation

InstallUbuntu
TDS Foreign data wrapper
ForeignTableCreation
TDS Foreign data wrapper
InstallCentOS
TDS Foreign data wrapper
UserMappingCreation
TDS Foreign data wrapper
Variables
TDS Foreign data wrapper
ForeignServerCreation
TDS Foreign data wrapper

README

TDS Foreign data wrapper

  • Author: Geoff Montee
  • Name: tds_fdw
  • File: tds_fdw/README.md

About

This is a PostgreSQL foreign data wrapper that can connect to databases that use the Tabular Data Stream (TDS) protocol, such as Sybase databases and Microsoft SQL server.

This foreign data wrapper requires a library that implements the DB-Library interface, such as FreeTDS. This has been tested with FreeTDS, but not the proprietary implementations of DB-Library.

This should support PostgreSQL 9.1+.

The current version does not yet support WHERE clause push-down, column push-down, JOIN push-down, or write operations.

Build Status

Build Status

Installing on CentOS

See installing tds_fdw on CentOS.

Installing on Ubuntu

See installing tds_fdw on Ubuntu.

Usage

Foreign server

See creating a foreign server.

Foreign table

See creating a foreign table.

User mapping

See creating a user mapping.

Variables

See variables.

Notes about character sets/encoding

  1. If you get an error like this with MS SQL Server when working with Unicode data:

    NOTICE: DB-Library notice: Msg #: 4004, Msg state: 1, Msg: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier., Server: PILLIUM\SQLEXPRESS, Process: , Line: 1, Level: 16
    ERROR: DB-Library error: DB #: 4004, DB Msg: General SQL Server error: Check messages from the SQL Server, OS #: -1, OS Msg: (null), Level: 16

    You may have to manually set tds version in freetds.conf to 7.0 or higher. See The freetds.conf File. and Choosing a TDS protocol version.

  2. Although many newer versions of the TDS protocol will only use USC-2 to communicate with the server, FreeTDS converts the UCS-2 to the client character set of your choice. To set the client character set, you can set client charset in freetds.conf. See The freetds.conf File and Localization and TDS 7.0.

Support

If you find any bugs, or you would like to request enhancements, please submit your comments on the project's GitHub Issues page.

Additionally, I do subscribe to several PostgreSQL mailing lists including pgsql-general and pgsql-hackers. If tds_fdw is mentioned in an email sent to one of those lists, I typically see it.