Installing the ODBC Driver

The rh-postgresql-ODBC package from Red Hat Database contains the psqlODBC ODBC driver and an ODBC catalog-extensions file for Red Hat Database. In order to develop applications that access RHDB databases using ODBC functions, install the rh-postgresql-devel package as well; it provides the include files and library necessary for writing applications that use ODBC functions. Refer to the Red Hat Database Getting Started / Installation Guide for more information about the packages.

After installing the package(s), the ODBC catalog extensions must be added to the database template. (Refer to the Red Hat Database Administrator and User's Guide for information about templates.) The file odbc.sql contains the appropriate definitions, it can be found under /usr/share/pgsql/ in the default installation layout. The catalog extensions are functions required by the ODBC standard, but are not supplied by Red Hat Database by default. One can easily add the extensions to the database template as follows:

$ psql -d template1 -f /usr/share/pgsql/odbc.sql

Specifying template1 as the target database ensures that all subsequent new databases will contain these name definitions.