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

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