Installation and Configuration of PGS Connector

The PGS connector makes use of ODBC to connect to PostgreSQL database. You must therefore install the PostgreSQL ODBC driver before connecting Uniface to your PostgreSQL database.

Installation

It is assumed that you have already installed a supported version of the PostgreSQL DBMS server.

  1. Obtain and install a supported version of the PostgreSQL client ODBC driver from http://www.postgresql.org/ftp/odbc/versions/. For supported versions, see the Uniface Platform Availability Matrix .
  2. Set up the DSN (Data Source Name) and database in ODBC. Choose Control Panel > ODBC and follow the instructions on screen.

    For example, define a System DSN, and select PostgreSQL Unicode.

    Note:  It is strongly recommended that you use the Unicode PostgreSQL.

    PostgreSQL ODBC Driver Configuration

    Setting up the ODBC DSN

    Note:  The PGS connector ignores the user and password defined in the ODBC Driver Setup.

  3. Click Datasource to edit Advanced options.

    Disable the LF<-> CR/LF conversion and set Level of rollback on errors to Statement.

    Note:  These settings prevent problems with overflow tables and segmented fields.

    Advanced Options

    Advanced options for PostgreSQL ODBC Datasource

Configuring Database Access

To configure Uniface to access a PostgreSQL database, edit the application assignment file. For example, you can edit the Uniface assignment file dbms.asn located in the \common\adm directory of the Uniface installation.

  1. In the [DRIVER_SETTINGS] section, declare the PGS connector and set any required connector options. For example:
    [DRIVER_SETTINGS]
    PGS     U1.4
    USYS$PGS_PARAMS identifiers = quoted

    For more information, see PGS Connector Options.

  2. In the [PATHS] section, define a logical path to the PostgreSQL database you want to access.

    $DBMS_DEFPGS:Data Source:Schema|User|Password

    • $DBMS_DEF—the default logical path Uniface uses for the application database.
    • DataSource—connection string for the ODBC Data Source Name (DSN). For example: PostgreSQL35W
    • Schema—name of a schema in the Database. For example: public.
    • UserName and Password—user and password for the database.

    For example:

    [PATHS]
    $DBMS_DEF PGS:PostgreSQL35W:public|signor|password

    For more information, see Configuring the Database Connector, Database Access, and Path-to-Connector Assignments.

Using PostgreSQL as the Uniface Repository

PostgreSQL can be used for the Uniface Repository. To do so:

  1. Use the SQL scripts provided with the installation kit to create the Repository. Edit the scripts before running them to add a set schema statement (set schema 'public';). These scripts create the necessary tables, indexes, triggers, and stored procedures.
  2. In the dbms.asn file located in the \common\adm directory, define a path to point to the PGS logon path. For example:
    [PATHS]
    $PGS PGS:

Related Topics