PostgreSQL.

For Windows environments the Full version (about 4.0 MB) is recommended and for Unix/Linux platforms the Source version (about 0.5 MB) is needed.

For a Unix/Linux connection there are three main stages needed. These are:

  1. Install the iODBC driver manager
  2. Install the PostgreSQL ODBC driver
  3. Set up the DSN

The iODBC driver manger for Unix/Linux platforms can be downloaded from:
http://www.iodbc.org by following the “downloads, cvs” link.

The PostgreSQL ODBC driver can be downloaded from:
http://www.postgresql.org/.
The link to the downloads page can also be found in the Top 5 Projects list under the GBorg heading down the left hand side of the PostgreSQL main page.

PostgreSQL Windows Connection

The PostgreSQL driver can be downloaded as a .zip file. Extract the file
psqlodbc.exe to the C:\Program Files\ directory.
In this example, the name of the downloaded zip file was psqlodbc.
Windows already includes an ODBC driver manager, so this does not need to be installed separately.

Installing the Driver

  1. From the Windows Start menu, select the Run option and browse to find the psqlodbc.exe file. When you have found it, run the .exe file.
  2. In the first window of the installation wizard, click the Next button.
  3. Read the License Agreement, and if you agree to its terms, select the “I accept the license agreement” radio button, and click the Next key.
  4. In the psqlODBC Setup window, click the Next button. The installation process will begin. This should take about ten seconds to complete.
  5. When the installation is complete, click the Finish button.

PostgreSQL Unix/Linux Connection

An ISO C compliant compiler (or ANSI C) must be installed before installation of PostgreSQL.

Installing the iODBC Driver Manager

The iODBC Driver Manager can be downloaded as an rpm file, or for older platform versions, a tar.gz file. You will need to build the driver manager. Download the appropriate file and copy it to your /usr directory. If you have a tar.gz file follow steps 1 to 3 and then continue at step 5, for an rpm file start at step 4.

  1. With the downloaded file in the /usr directory, unzip the file with the command: gunzip libiodbc-3.51.1.tar.gz
  2. Extract the files with the command: tar xvf libiodbc-3.51.1..tar
  3. Change directory to the newly created installation directory with the command: cd iodbc-3.51.1.
  4. For an rpm file, run the command: rpm –i file_name.
  5. In the new directory run the command: ./configure The system will carry out a series of configuration functions.
  6. Run the command: make
  7. Run the command: make install

Installing the PostgreSQL ODBC Driver

The PostgreSQL ODBC driver can be downloaded as a tar.gz file. You will need to build the driver manager. Download the appropriate file and copy it to your /usr directory.

  1. With the downloaded file in the /usr directory, unzip the file with the command: gunzip psqlodbc-07.03.0200.tar.gz
  2. Extract the files with the command: tar xvf psqlodbc-07.03.0200.tar
  3. Change directory to the newly created installation directory with the command: cd psqlodbc-07.03.0200
  4. In the new directory run the command: ./configure The system will carry out a series of configuration functions.
  5. Run the command: make
  6. Run the command: make install

Creating a DSN

The database and the DSN must have the same name, otherwise serious system error may be encountered.

You will also need to find the location of the psqlodbc.so file before starting to create the DSN. This will probably be /usr/lib/psqlodbc.so.

  1. Search for the file /etc/odbc.ini.
    This may have been created during the iODBC installation. If it has not, you will need to create the file manually. If you have to create the /etc/odbc.ini file manually it should look something like the example shown in Step 2.
  2. Add the following details to the odbc.inin file: [ODBC Data Sources]
    cms = PostgreSQL cms
    [cms]
    Description = PostgreSQL cms
    Driver = /usr/lib/psqlodbc.so
    Trace = No
    TraceFile = /tmp/odbc.log
    Databse = cms
    UserName =
    Password =
    Port = 5432
    Protocol = 6.4
    ReadOnly = Yes
    RowVersioning = No
    ShowSystemTables = No
    SowOidColumn = No
    FakeOidIndex = No
    ConnSettings =
  3. Edit the following settings in your environment: HYDRA_DB_DRIVER=odbc
    SQLSERVER=cms
    ODBCINI=/etc/odbc.ini
    Each user can have their own odbc.ini file if needed. If you want to test the connection to the database, you can use the ‘odbctest’ tool, provided by iODBC, as well as the ‘testconn’ application in ‘HydraStudio’.

Click the link below to see
all KB articles by product.