Installing Functions for PostgreSQL

Use the following instructions to replace the standard T-SQL functions with some external, non-T-SQL equivalent functions. You only need to do this if you are having problems (e.g. performance issues) with the standard database views.

Restriction: MFDBFH currently only supports the installation of external functions for 64-bit PostgreSQL servers.
  1. Do one of the following:
    • For Windows: copy DbfhFuncsPG.dll, located in the etc\mfdbfh\dbfhfuncs\x64 sub-folder of the installation folder, into the \lib sub-folder of the PostgreSQL database server's installation folder.
    • For UNIX, copy DbfhFuncsPG.so, located in the etc/mfdbfh/dbfhfuncs/x64 sub-folder of the installation folder, into the /lib sub-folder of the PostgreSQL database server's installation folder.
  2. Within Enterprise Developer, create the functions script:
    dbfhadmin -script -provider:pg -type:datastore_funcs -name:<datastore_name>

    By default, the command creates a script file named create_datastore_funcs_<datastore_name>_pg.sql

  3. Using psql, run the created script file.

    The external functions replace the currently installed T-SQL ones within your database. Existing views should continue to work, using the new functions.