Skip to content

xxhash

pg_xxhash : xxhash functions for PostgreSQL

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
4430
xxhash
pg_xxhash
0.0.1
UTIL
BSD 2-Clause
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-dtr
No
Yes
No
Yes
yes
yes
Relationships
See Also
hashlib
shacrypt
pgcrypto
gzip
bzip
zstd
http
pg_net

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
0.0.1
18
17
16
15
14
pg_xxhash-
RPM
PIGSTY
0.0.1
18
17
16
15
14
pg_xxhash_$v-
DEB
PIGSTY
0.0.1
18
17
16
15
14
postgresql-$v-pg-xxhash-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
el8.aarch64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
el9.x86_64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
el9.aarch64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
el10.x86_64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
el10.aarch64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
d12.x86_64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
d12.aarch64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
d13.x86_64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
d13.aarch64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
u22.x86_64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
u22.aarch64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
u24.x86_64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
u24.aarch64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
u26.x86_64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
u26.aarch64
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PIGSTY 0.0.1
PackageVersionOSORGSIZEFile URL
pg_xxhash_180.0.1el8.x86_64pigsty30.8 KiBpg_xxhash_18-0.0.1-1PIGSTY.el8.x86_64.rpm
pg_xxhash_180.0.1el8.aarch64pigsty30.8 KiBpg_xxhash_18-0.0.1-1PIGSTY.el8.aarch64.rpm
pg_xxhash_180.0.1el9.x86_64pigsty18.2 KiBpg_xxhash_18-0.0.1-1PIGSTY.el9.x86_64.rpm
pg_xxhash_180.0.1el9.aarch64pigsty18.8 KiBpg_xxhash_18-0.0.1-1PIGSTY.el9.aarch64.rpm
pg_xxhash_180.0.1el10.x86_64pigsty17.8 KiBpg_xxhash_18-0.0.1-1PIGSTY.el10.x86_64.rpm
pg_xxhash_180.0.1el10.aarch64pigsty18.8 KiBpg_xxhash_18-0.0.1-1PIGSTY.el10.aarch64.rpm
postgresql-18-pg-xxhash0.0.1d12.x86_64pigsty69.3 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~bookworm_amd64.deb
postgresql-18-pg-xxhash0.0.1d12.aarch64pigsty73.0 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~bookworm_arm64.deb
postgresql-18-pg-xxhash0.0.1d13.x86_64pigsty69.2 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~trixie_amd64.deb
postgresql-18-pg-xxhash0.0.1d13.aarch64pigsty73.6 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~trixie_arm64.deb
postgresql-18-pg-xxhash0.0.1u22.x86_64pigsty75.4 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~jammy_amd64.deb
postgresql-18-pg-xxhash0.0.1u22.aarch64pigsty76.6 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~jammy_arm64.deb
postgresql-18-pg-xxhash0.0.1u24.x86_64pigsty62.9 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~noble_amd64.deb
postgresql-18-pg-xxhash0.0.1u24.aarch64pigsty67.4 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~noble_arm64.deb
postgresql-18-pg-xxhash0.0.1u26.x86_64pigsty63.6 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~resolute_amd64.deb
postgresql-18-pg-xxhash0.0.1u26.aarch64pigsty68.3 KiBpostgresql-18-pg-xxhash_0.0.1-1PIGSTY~resolute_arm64.deb

Source

pig build pkg pg_xxhash;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

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

Install this extension with pig:

pig install pg_xxhash;		# install via package name, for the active PG version
pig install xxhash;		# install by extension name, for the current active PG version

pig install xxhash -v 18;   # install for PG 18
pig install xxhash -v 17;   # install for PG 17
pig install xxhash -v 16;   # install for PG 16
pig install xxhash -v 15;   # install for PG 15
pig install xxhash -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION xxhash;

Usage

xxhash: xxHash hash functions for PostgreSQL

Provides xxHash non-cryptographic hash functions that return hex strings or bytea.

Text Output Functions

SELECT xxh32('https://example.com');     -- 'ba15a4a8'
SELECT xxh64('https://example.com');     -- 'b131752760b48654'
SELECT xxh3_64('https://example.com');   -- '9398cc7c078760e6'
SELECT xxh128('https://example.com');    -- '4879d6aa9d88e9c7a169c008892d4829'

Binary Output Functions

SELECT xxh32b('https://example.com');    -- \xba15a4a8
SELECT xxh64b('https://example.com');    -- \xb131752760b48654
SELECT xxh3_64b('https://example.com');  -- \x9398cc7c078760e6
SELECT xxh128b('https://example.com');   -- \x4879d6aa9d88e9c7a169c008892d4829

Available Functions

FunctionBitsOutput
xxh32(text)32hex text
xxh64(text)64hex text
xxh3_64(text)64hex text
xxh128(text)128hex text
xxh32b(text)32bytea
xxh64b(text)64bytea
xxh3_64b(text)64bytea
xxh128b(text)128bytea
Last updated on