uint128
uint128
pg_uint128 : Native uint128 type
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3740 | uint128
|
pg_uint128
|
1.2.0 |
TYPE
|
PostgreSQL
|
C
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d-r
|
No
|
Yes
|
No
|
Yes
|
yes
|
no
|
| Relationships | |
|---|---|
| See Also | prefix
semver
unit
pgpdf
pglite_fusion
md5hash
asn1oid
roaringbitmap
|
breaks on el8 since 1.1 ,fix el8 build problem by adding __has_builtin marco
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
1.2.0 |
18
17
16
15
14
|
pg_uint128 |
- |
| RPM | PIGSTY
|
1.2.0 |
18
17
16
15
14
|
pg_uint128_$v |
- |
| DEB | PIGSTY
|
1.2.0 |
18
17
16
15
14
|
postgresql-$v-pg-uint128 |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
el8.aarch64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
el9.x86_64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
el9.aarch64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
el10.x86_64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
el10.aarch64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
d12.x86_64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
d12.aarch64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
d13.x86_64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
d13.aarch64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
u22.x86_64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
u22.aarch64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
u24.x86_64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
u24.aarch64
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
PIGSTY 1.2.0
|
Source
pig build pkg pg_uint128; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_uint128; # install via package name, for the active PG version
pig install uint128; # install by extension name, for the current active PG version
pig install uint128 -v 18; # install for PG 18
pig install uint128 -v 17; # install for PG 17
pig install uint128 -v 16; # install for PG 16
pig install uint128 -v 15; # install for PG 15
pig install uint128 -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION uint128;Usage
The uint128 extension provides comprehensive unsigned and 128-bit integer types with full operator and index support.
CREATE EXTENSION uint128;Data Types
| Type | Size | Range |
|---|---|---|
uint1 |
8-bit | 0 to 255 |
uint2 |
16-bit | 0 to 65535 |
uint4 |
32-bit | 0 to 4294967295 |
uint8 |
64-bit | 0 to 18446744073709551615 |
uint16 |
128-bit | 0 to 340282366920938463463374607431768211455 |
int1 |
8-bit | -128 to 127 |
int16 |
128-bit | -170141183460469231731687303715884105728 to 170141183460469231731687303715884105727 |
Operators
- Arithmetic:
+,-,*,/,% - Bitwise:
#(XOR),&(AND),|(OR),~(NOT),<<(left shift),>>(right shift) - Comparison:
=,<>,>,<,>=,<=
Mixed-type arithmetic between signed and unsigned types is supported.
Features
- Range types for all integer types (
uint1range,uint16range, etc.) with GiST indexing - Casts to/from
numeric,real,double,uuid(uint16 only),json,jsonb - Aggregate functions:
SUM,AVG,MIN,MAX generate_series()support for all types- Btree and hash index support
- Binary send/receive protocol support
Last updated on