Skip to content
xxhash

xxhash

pg_xxhash : xxhash functions for PostgreSQL

Overview

ID Extension Package Version Category License Language
4430
xxhash
pg_xxhash
0.0.1
UTIL
BSD-2-Clause
C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-dtr
No
Yes
No
Yes
yes
yes
Relationships
See Also
pgcrypto
hashlib
md5hash
hashtypes
pgsodium
shacrypt
cryptint
pguecc

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
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 / PG PG18 PG17 PG16 PG15 PG14
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
Package Version OS ORG SIZE File URL
pg_xxhash_18 0.0.1 el8.x86_64 pigsty 30.8 KiB pg_xxhash_18-0.0.1-1PIGSTY.el8.x86_64.rpm
pg_xxhash_18 0.0.1 el8.aarch64 pigsty 30.8 KiB pg_xxhash_18-0.0.1-1PIGSTY.el8.aarch64.rpm
pg_xxhash_18 0.0.1 el9.x86_64 pigsty 18.2 KiB pg_xxhash_18-0.0.1-1PIGSTY.el9.x86_64.rpm
pg_xxhash_18 0.0.1 el9.aarch64 pigsty 18.8 KiB pg_xxhash_18-0.0.1-1PIGSTY.el9.aarch64.rpm
pg_xxhash_18 0.0.1 el10.x86_64 pigsty 17.8 KiB pg_xxhash_18-0.0.1-1PIGSTY.el10.x86_64.rpm
pg_xxhash_18 0.0.1 el10.aarch64 pigsty 18.8 KiB pg_xxhash_18-0.0.1-1PIGSTY.el10.aarch64.rpm
postgresql-18-pg-xxhash 0.0.1 d12.x86_64 pigsty 69.3 KiB postgresql-18-pg-xxhash_0.0.1-1PIGSTY~bookworm_amd64.deb
postgresql-18-pg-xxhash 0.0.1 d12.aarch64 pigsty 73.0 KiB postgresql-18-pg-xxhash_0.0.1-1PIGSTY~bookworm_arm64.deb
postgresql-18-pg-xxhash 0.0.1 d13.x86_64 pigsty 69.2 KiB postgresql-18-pg-xxhash_0.0.1-1PIGSTY~trixie_amd64.deb
postgresql-18-pg-xxhash 0.0.1 d13.aarch64 pigsty 73.6 KiB postgresql-18-pg-xxhash_0.0.1-1PIGSTY~trixie_arm64.deb
postgresql-18-pg-xxhash 0.0.1 u22.x86_64 pigsty 75.4 KiB postgresql-18-pg-xxhash_0.0.1-1PIGSTY~jammy_amd64.deb
postgresql-18-pg-xxhash 0.0.1 u22.aarch64 pigsty 76.6 KiB postgresql-18-pg-xxhash_0.0.1-1PIGSTY~jammy_arm64.deb
postgresql-18-pg-xxhash 0.0.1 u24.x86_64 pigsty 62.9 KiB postgresql-18-pg-xxhash_0.0.1-1PIGSTY~noble_amd64.deb
postgresql-18-pg-xxhash 0.0.1 u24.aarch64 pigsty 67.4 KiB postgresql-18-pg-xxhash_0.0.1-1PIGSTY~noble_arm64.deb
postgresql-18-pg-xxhash 0.0.1 u26.x86_64 pigsty 63.6 KiB postgresql-18-pg-xxhash_0.0.1-1PIGSTY~resolute_amd64.deb
postgresql-18-pg-xxhash 0.0.1 u26.aarch64 pigsty 68.3 KiB postgresql-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

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