!pgmp extension installation


!pgmp is currently compatible with:

  • PostgreSQL from version 8.4
  • GMP from version 4.3 (tested with versions 4.3.2 and 5.0.1)

Building the library

The library must be built and installed to be used with a database cluster: once it is built, SQL installation scripts can be used to install the data types and functions in one or more databases.

In order to build the library your system must have the server development files (on Debian systems usually packaged as postgresql-server-dev) and regular UNIX development tools, such as make. The pg_config program should be available in the PATH. If more than one PostgreSQL version is available on the system, the library will be built against the version of the first pg_config found in the path.

To build and install the library:

$ make
$ sudo make install

You can test the installation with:

$ make installcheck

(adjust the REGRESS_OPTS variable to select a test database).

Installing the extension

With PostgreSQL versions before 9.1, an install script called pgmp.sql is installed in the directory {$sharedir}/pgmp: just run the script into a database to install the provided types and functions. An uninstall script is also provided in the same directory to remove the installed objects.

With PostgreSQL 9.1 the library is packaged as an extension: once built and installed in the cluster, use the command:


to install it in a database. If your database was migrated from a previous PostgreSQL version, you can convert the !pgmp objects into a packaged extension using the command:

=# CREATE EXTENSION pgmp FROM unpackaged;

In order to uninstall the extension you can use the DROP EXTENSION command. Please refer to the documentation for further informations about PostgreSQL extensions management.