- Author: Geoff Montee
- Name: tds_fdw
- File: tds_fdw/InstallopenSUSE.md
This document will show how to install tds_fdw on openSUSE Leap 15.1. Other openSUSE and SUSE distributions should be similar.
The TDS foreign data wrapper requires a library that implements the DB-Library interface, such as FreeTDS.
sudo zypper install freetds-devel
Some other dependencies are also needed to install PostgreSQL and then compile tds_fdw:
sudo zypper install gcc make
If you need to install PostgreSQL, for example, 10.X:
sudo zypper install postgresql10 postgresql10-server postgresql10-devel
NOTE: If you already have PostgreSQL installed on your system be sure that the package postgresqlXX-devel is installed too (where XX stands for your PostgreSQL version).
If you'd like to use one of the release packages, you can download and install them via something like the following:
export TDS_FDW_VERSION="2.0.4"
wget https://github.com/tds-fdw/tds_fdw/archive/v${TDS_FDW_VERSION}.tar.gz
tar -xvzf v${TDS_FDW_VERSION}.tar.gz
cd tds_fdw-${TDS_FDW_VERSION}/
make USE_PGXS=1
sudo make USE_PGXS=1 install
NOTE: If you have several PostgreSQL versions and you do not want to build for the default one, first locate where the binary for pg_config
is, take note of the full path, and then append PG_CONFIG=<PATH>
after USE_PGXS=1
at the make
commands.
If you would rather use the current development version, you can clone and build the git repository via something like the following:
zypper in git
git clone https://github.com/tds-fdw/tds_fdw.git
cd tds_fdw
make USE_PGXS=1
sudo make USE_PGXS=1 install
NOTE: If you have several PostgreSQL versions and you do not want to build for the default one, first locate where the binary for pg_config
is, take note of the full path, and then append PG_CONFIG=<PATH>
after USE_PGXS=1
at the make
commands.
If this is a fresh installation, then start the server:
sudo service postgresql start
psql -U postgres
postgres=# CREATE EXTENSION tds_fdw;