pgmp
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3700 | pgmp | No | Yes | No | Yes | No | Yes | - |
PIGSTY RPM and DEB packages are aligned at 1.0.6 for PostgreSQL 14 through 18.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0.6 | 1817161514 | pgmp | - |
| RPM | PIGSTY | 1.0.6 | 1817161514 | pgmp_$v | - |
| DEB | PIGSTY | 1.0.6 | 1817161514 | postgresql-$v-pgmp | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 el8.x86_64.pg15 : pgmp_15 pgmp_15-1.0.6-1PIGSTY.el8.x86_64.rpm
pgmp_15-1.0.6-1PGDG.rhel8.10.x86_64.rpm
pgmp_15-1.0.4-4.rhel8.x86_64.rpm
| PIGSTY 1.0.6 el8.x86_64.pg14 : pgmp_14 pgmp_14-1.0.6-1PIGSTY.el8.x86_64.rpm
pgmp_14-1.0.6-1PGDG.rhel8.10.x86_64.rpm
pgmp_14-1.0.4-4.rhel8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 el8.aarch64.pg15 : pgmp_15 pgmp_15-1.0.6-1PIGSTY.el8.aarch64.rpm
pgmp_15-1.0.6-1PGDG.rhel8.10.aarch64.rpm
pgmp_15-1.0.4-4.rhel8.aarch64.rpm
| PIGSTY 1.0.6 el8.aarch64.pg14 : pgmp_14 pgmp_14-1.0.6-1PIGSTY.el8.aarch64.rpm
pgmp_14-1.0.6-1PGDG.rhel8.10.aarch64.rpm
pgmp_14-1.0.4-4.rhel8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 el9.x86_64.pg15 : pgmp_15 pgmp_15-1.0.6-1PIGSTY.el9.x86_64.rpm
pgmp_15-1.0.5-6PGDG.rhel9.8.x86_64.rpm
pgmp_15-1.0.4-4.rhel9.x86_64.rpm
| PIGSTY 1.0.6 el9.x86_64.pg14 : pgmp_14 pgmp_14-1.0.6-1PIGSTY.el9.x86_64.rpm
pgmp_14-1.0.5-6PGDG.rhel9.8.x86_64.rpm
|
| el9.aarch64 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 |
| el10.x86_64 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 |
| el10.aarch64 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 | PIGSTY 1.0.6 |
| d12.x86_64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
| d12.aarch64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
| d13.x86_64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
| d13.aarch64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
| u22.x86_64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
| u22.aarch64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
| u24.x86_64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
| u24.aarch64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
| u26.x86_64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
| u26.aarch64 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 | PGDG 1.0.6 |
Build
You can build the RPM / DEB packages for pgmp using pig build:
Install
You can install pgmp directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
- pgmp 1.0.6 README
- pgmp 1.0.6 release notes
- pgmp 1.0.6 metadata
- pgmp control file
- Official pgmp documentation
pgmp exposes GNU MP arithmetic inside PostgreSQL. It adds arbitrary-size integer values through mpz and exact rational values through mpq, together with casts, arithmetic, comparison, aggregate, number-theory, bit, and random-number functions.
Core Workflow
mpz is an arbitrary-size integer type, subject to PostgreSQL’s value-size limits. mpq stores a canonical numerator and denominator so fractional arithmetic remains exact until explicitly converted to an approximate type.
Important Objects
mpz(text)and casts construct integers in decimal or supported base-prefixed forms.mpq(text)andmpq(mpz, mpz)construct rational values.- Both types support ordinary comparisons and btree or hash indexes.
- Integer helpers include division with explicit rounding modes, powers, roots, primality tests,
gcd,lcm, factorials, Fibonacci and Lucas numbers, bit operations, and random-state functions. - Rational helpers include numerator and denominator access, inversion, denominator limiting, arithmetic, comparison, and aggregates.
gmp_version()andgmp_max_bitcnt()expose library information.
Do not use floating-point input when exact decimal or rational meaning matters; construct values from text, integers, or explicit numerator and denominator values.
Version 1.0.6 Notes
The 1.0.6 distribution adds PostgreSQL 19 build compatibility, sets PostgreSQL 14 as the supported runtime floor in its metadata, and adds missing unsigned-long range checks for the power, Fibonacci, and Lucas-number paths.
The upstream distribution version is 1.0.6, while its tagged pgmp.control currently declares SQL extension version 1.1. Create the extension without forcing a version and inspect the database-reported value before designing an upgrade:
pgmp requires the GMP shared library. GMP 4.1 lacks a few functions documented by upstream, including some root, bit, and random-state helpers; use a current GMP release when those objects are required. Large operands can consume substantial backend memory and CPU, so apply statement timeouts and input limits to untrusted arithmetic workloads.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)