PostgreSQL Connector > PostgreSQL pushdown optimization > Configuring a PostgreSQL ODBC connection
  

Configuring a PostgreSQL ODBC connection

You can set the pushdown optimization for the ODBC connection type that uses the PostgreSQL ODBC driver to enhance the mapping performance. To use an ODBC connection to connect to PostgreSQL, you must configure the ODBC connection.
After you create a PostgreSQL ODBC connection, navigate to the Pushdown Optimization section, and then from the Pushdown Optimization list, select Full or To Source. You cannot configure target-side pushdown optimization by using PostgreSQL ODBC driver. To verify that the pushdown optimization has taken place, you can check the session log for the job. In Monitor, view the log for jobs.
PostgreSQL supports PostgreSQL ODBC drivers on Windows and Linux systems. You must install the PostgreSQL ODBC 64-bit driver based on your system requirement.

Configuring a PostgreSQL ODBC connection on Windows

Before you establish an ODBC connection to connect to PostgreSQL Cloud Data Warehouse on Windows, you must configure the ODBC connection.
Perform the following steps to configure an ODBC connection on Windows:
    1. Download the PostgreSQL ODBC 64-bit driver.
    2. Install the PostgreSQL ODBC driver on the machine where the Secure Agent is installed.
    3. Open the folder in which ODBC data source file is installed.
    4. Run the odbcad32.exe file.
    The ODBC Data Source Administrator dialog box appears.
    5. Click System DSN.
    The System DSN tab appears.
    6. Click Add.
    The Create New Data Source dialog appears.
    7. Select the PostgreSQL driver and click Finish.
    8. Click Configure.
    The PostgreSQL Configuration Dialog appears.
    9. Specify the required connection properties.
    10. Click OK.
The PostgreSQL ODBC connection is configured successfully on Windows.
After you configure the PostgreSQL ODBC connection, you must create an ODBC connection to connect to PostgreSQL.

Configuring a PostgreSQL ODBC connection on Linux

Before you establish an ODBC connection to connect to PostgreSQL on Linux, you must configure the ODBC connection.
Perform the following steps to configure an ODBC connection on Linux:
    1. Download the PostgreSQL ODBC 64-bit driver.
    2. Install the PostgreSQL ODBC driver on the machine where the Secure Agent is installed.
    3. Configure the odbc.ini file properties with the required database details.
    For example, see the following sample ODBC.ini snippet:
    [ODBC_PostgreSQL]
    Driver=/root/ODBC_Drivers/DWpsql27.so
    Description=PostgreSQL DSN
    HostName=<hostname>
    PortNumber=5432
    Database=<databasename>
    4. Run the following command to export the odbc.ini file:
    Export ODBCINI=/<odbc.ini file path>/odbc.ini
    5. Restart the Secure Agent.
The PostgreSQL ODBC connection on Linux is configured successfully.
After you configure the PostgreSQL ODBC connection, you must create an ODBC connection to connect to PostgreSQL.