uint
unsigned integer types
Repository
petere/pguint
https://github.com/petere/pguint
Source
pguint-1.20250815.tar.gz
pguint-1.20250815.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pguint | 1.20250815 | TYPE | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3730 | uint | No | Yes | No | Yes | No | Yes | - |
| Related | prefix semver unit pgpdf pglite_fusion md5hash asn1oid roaringbitmap |
|---|
no pg14 for el8/el9 pgdg repo
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 1.20250815 | 1817161514 | pguint | - |
| RPM | PIGSTY | 1.20250815 | 1817161514 | pguint_$v | - |
| DEB | PIGSTY | 1.20250815 | 1817161514 | postgresql-$v-pguint | - |
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
The uint extension adds unsigned and small integer types to PostgreSQL.
CREATE EXTENSION uint;
Data Types
| Type | Description | Range |
|---|---|---|
int1 | Signed 8-bit integer | -128 to 127 |
uint1 | Unsigned 8-bit integer | 0 to 255 |
uint2 | Unsigned 16-bit integer | 0 to 65535 |
uint4 | Unsigned 32-bit integer | 0 to 4294967295 |
uint8 | Unsigned 64-bit integer | 0 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.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.