If a dynamically loadable module needs to be opened and the file name specified in the CREATE FUNCTION or LOAD command does not have a directory component (i.e., the name does not contain a slash), the system will search this path for the required file.
The value for
dynamic_library_path must be a list of absolute directory paths separated by colons (or semi-colons on Windows). If a list element starts with the special string
$libdir, the compiled-in PostgreSQL package library directory is substituted for
$libdir; this is where the modules provided by the standard PostgreSQL distribution are installed. (Use
pg_config --pkglibdir to find out the name of this directory.) For example:dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir' or, in a Windows environment:dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
The default value for this parameter is
'$libdir'. If the value is set to an empty string, the automatic path search is turned off.
This parameter can be changed at run time by superusers, but a setting done that way will only persist until the end of the client connection, so this method should be reserved for development purposes. The recommended way to set this parameter is in the postgresql.conf configuration file.