Chapter 2. Using the pgExpress Driver

1. Requirements

The basic requirements for using teh pgExpress Driver are:

  • Delphi 6+, Kylix, or Codegear C++ Builder 6+;, with dbExpress
  • A libpq library compatible with the server version the driver will connect.
  • A compatible PostgreSQL server version 7.1 or newer should work fine, but we recommend using at least version 7.4, or preferably, the latest one.

1.1. Libpq

The pgExpress package contains a libpq library that can be used to connect to your database server. It is supplied just to make installation easier; however, you can use any libpq as long as it is compatible with your database server.

It is possible that the supplied libpq library contains some dependencies that are not met by your system, or by the deployment system. In that case, we suggest to either compile the libpq yourself.

Under Windows, you can either use our supplied libpq, which should work on all related platforms out of the box, or get the binary from the PostgreSQL distribution. The supplied libpq does not include SSL support in order to make requirements easier to achieve.

We look forward to include always the latest libpq version in the pgExpress package, but feel free to replace it with the latest version you have on your system at any time. For Windows users, please refer to PostgreSQL for Windows distribution, and get the latest "no-installer" distribution, such as "postgresql-8.1.2-1-binaries-no-installer.zip". This file will contain the latest libpq library compiled for Windows, and any additional requirements.

The dependencies for the libpq.so library can vary from version to version, but at the time of this writing, are:

libpq.so.4:
libssl.so.4 = /usr/lib/libssl.so.4 (0x28176000)
libcrypto.so.4 = /lib/libcrypto.so.4 (0x281a4000)
libcrypt.so.3 = /lib/libcrypt.so.3 (0x28296000)

Note for libpq incompatibilities:

There could be some incompatibility problems between the libpq.dll /libpq.so library provided in the distribution and other clients such as psql - specialy under Linux/Kylix. To solve this, you can either:

If you rename the library to libpq_pge.so, for instance, your entry should become VendorLib=libpq_pge.so accordingly. There are more instructions on the dbxdrivers.ini/dbxdrivers file below.

  1. (for Linux only)- use the standard libpq.so file from the original PostgreSQL distribution, as it is, on your system;
  2. Rename the libpq.so/libpq.dll file from the pgExpress Driver distribution to something else, and update the entry on the dbxdrivers.ini /dbxdrivers file (which is by default
    VendorLib=libpq.so
    
    under Kylix or
    VendorLib=libpq.dll
    
    under Windows.