TDS Foreign data wrapper

  • Author: Geoff Montee
  • Name: tds_fdw
  • File: tds_fdw/

Installing on Ubuntu

This document will show how to install tds_fdw on Ubuntu 12.04. Other Ubuntu distributions should be similar.

Install FreeTDS

The TDS foreign data wrapper requires a library that implements the DB-Library interface, such as FreeTDS.

bash sudo apt-get install libsybdb5 freetds-dev freetds-common

Install PostgreSQL

If you need to install PostgreSQL, do so by following the apt installation directions. For example, to install PostgreSQL 9.4 on Ubuntu:

bash sudo bash -c "echo \"deb $(lsb_release -c -s)-pgdg main\" > /etc/apt/sources.list.d/pgdg.list" wget --quiet -O - | sudo apt-key add - sudo apt-get update sudo apt-get upgrade sudo apt-get install postgresql-9.4 postgresql-client-9.4 postgresql-server-dev-9.4

Install tds_fdw

Build from release package

If you'd like to use one of the release packages, you can download and install them via something like the following:

bash wget tar -xvzf tds_fdw-1.0.2.tar.gz cd tds_fdw-1.0.2 make USE_PGXS=1 sudo make USE_PGXS=1 install

Build from repository

If you would rather use the current development version, you can clone and build the git repository via something like the following:

bash git clone cd tds_fdw make USE_PGXS=1 sudo make USE_PGXS=1 install

Start server

If this is a fresh installation, then start the server:

bash sudo /etc/init.d/postgresql start

Install extension

bash psql -U postgres postgres=# CREATE EXTENSION tds_fdw;