uint

unsigned integer types

Overview

PackageVersionCategoryLicenseLanguage
pguint1.20250815TYPEPostgreSQLC
IDExtensionBinLibLoadCreateTrustRelocSchema
3730uintNoYesNoYesNoYes-
Relatedprefix semver unit pgpdf pglite_fusion md5hash asn1oid roaringbitmap

no pg14 for el8/el9 pgdg repo

Version

TypeRepoVersionPG VerPackageDeps
EXTMIXED1.202508151817161514pguint-
RPMPIGSTY1.202508151817161514pguint_$v-
DEBPIGSTY1.202508151817161514postgresql-$v-pguint-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64
el8.aarch64
el9.x86_64
el9.aarch64
el10.x86_64
el10.aarch64
d12.x86_64
d12.aarch64
d13.x86_64
d13.aarch64
u22.x86_64
u22.aarch64
u24.x86_64
u24.aarch64

Build

You can build the RPM / DEB packages for pguint using pig build:

pig build pkg pguint         # build RPM / DEB packages

Install

You can install pguint directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:

pig repo add pgsql -u          # Add repo and update cache

Install the extension using pig or apt/yum/dnf:

pig install pguint;          # Install for current active PG version
pig ext install -y pguint -v 18  # PG 18
pig ext install -y pguint -v 17  # PG 17
pig ext install -y pguint -v 16  # PG 16
pig ext install -y pguint -v 15  # PG 15
pig ext install -y pguint -v 14  # PG 14
dnf install -y pguint_18       # PG 18
dnf install -y pguint_17       # PG 17
dnf install -y pguint_16       # PG 16
dnf install -y pguint_15       # PG 15
dnf install -y pguint_14       # PG 14
apt install -y postgresql-18-pguint   # PG 18
apt install -y postgresql-17-pguint   # PG 17
apt install -y postgresql-16-pguint   # PG 16
apt install -y postgresql-15-pguint   # PG 15
apt install -y postgresql-14-pguint   # PG 14

Create Extension:

CREATE EXTENSION uint;

Usage

uint: unsigned integer types for PostgreSQL

The uint extension adds unsigned and small integer types to PostgreSQL.

CREATE EXTENSION uint;

Data Types

TypeDescriptionRange
int1Signed 8-bit integer-128 to 127
uint1Unsigned 8-bit integer0 to 255
uint2Unsigned 16-bit integer0 to 65535
uint4Unsigned 32-bit integer0 to 4294967295
uint8Unsigned 64-bit integer0 to 18446744073709551615

Usage

CREATE TABLE foo (
    a uint4,
    b text
);

SELECT * FROM foo WHERE a > 4;
SELECT avg(a) FROM foo;

Operators and Functions

All types include a full set of arithmetic operators (+, -, *, /, %), comparison operators (=, <>, <, >, <=, >=), and operators for each combination of types. Standard aggregate functions and index support (btree, hash) are also provided.


Last Modified 2026-03-12: add pg extension catalog (95749bf)