Skip to content

dvarrazzo/pgmp

Folders and files

NameName
Last commit message
Last commit date
Sep 14, 2023
Apr 27, 2024
Jan 8, 2025
Apr 27, 2024
Apr 27, 2024
Apr 27, 2024
Jan 31, 2020
Apr 27, 2024
Jan 31, 2020
Mar 26, 2011
Jan 30, 2020
Jan 31, 2020
Apr 27, 2024
Sep 10, 2023
Sep 10, 2023
May 23, 2011

Repository files navigation

PostgreSQL Multiple Precision Arithmetic extension

Build status

pgmp is a PostgreSQL extension module to add support for the arbitrary precision data types offered by the GMP library into the database.

The extension adds the types mpz (arbitrary size integers) and mpq (arbitrary precision rationals) to PostgreSQL and exposes to the database all the functions available in the GMP library for these types, providing:

  • higher performance arithmetic on integers respect to the decimal data type, using numbers only limited by the 1GB varlena maximum size;
  • a rational data type for absolute precision storage and arithmetic;
  • the use of specialized functions to deal with prime numbers, random numbers, factorization directly into the database.

The GMP data types can be stored into the database, used in mixed arithmetic with other PostgreSQL numeric types and indexed using the btree or hash methods.

Please refer to the documentation for installation and usage, either online or in the docs/ directory.