PostgreSQL 7.1.3 Documentation
Prev | Chapter 7. ODBC Interface | Next

# 7.2. Installation

The first thing to note about the psqlODBC driver (or any ODBC driver) is that there must exist a driver manager on the system where the ODBC driver is to be used. There exists a free ODBC driver for Unix called iODBC which can be obtained via http://www.iodbc.org. Instructions for installing iODBC are contained in the iODBC distribution. Having said that, any driver manager that you can find for your platform should support the psqlODBC driver, or any other ODBC driver for that matter.

To install psqlODBC you simply need to supply the `--enable-odbc` option to the `configure` script when you are building the entire PostgreSQL distribution. The library and header files will then automatically be built and installed with the rest of the programs. If you forget that option or want to build the ODBC driver later you can change into the directory `src/interfaces/odbc` and do `make` and `make install` there.

The installation-wide configuration file `odbcinst.ini` will be installed into the directory `/usr/local/pgsql/etc/`, or equivalent, depending on what `--prefix` and/or `--sysconfdir` options you supplied to `configure`. Since this file can also be shared between different ODBC drivers you can also install it in a shared location. To do that, override the location of this file with the `--with-odbcinst` option.

Additionally, you should install the ODBC catalog extensions. That will provide a number of functions mandated by the ODBC standard that are not supplied by PostgreSQL by default. The file `/usr/local/pgsql/share/odbc.sql` (in the default installation layout) contains the appropriate definitions, which you can install as follows:

    psql -d template1 -f LOCATION/odbc.sql

where specifying `template1` as the target database will ensure that all subsequent new databases will have these same definitions.

## 7.2.1. Supported Platforms

psqlODBC has been built and tested on Linux. There have been reports of success with FreeBSD and with Solaris. There are no known restrictions on the basic code for other platforms which already support Postgres.

Prev | Home | Next
ODBC Interface | Up | Configuration Files