-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathxxhash--0.0.1.sql
21 lines (13 loc) · 1.5 KB
/
xxhash--0.0.1.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
\echo Use "CREATE EXTENSION xxhash" to load this file. \quit
-- functions that return hex text (like md5())
CREATE OR REPLACE FUNCTION xxh32(text) RETURNS varchar(8) AS 'MODULE_PATHNAME', 'pg_xxh32' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION xxh64(text) RETURNS varchar(16) AS 'MODULE_PATHNAME', 'pg_xxh64' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION xxh3_64(text) RETURNS varchar(16) AS 'MODULE_PATHNAME', 'pg_xxh3_64' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION xxh3_128(text) RETURNS varchar(32) AS 'MODULE_PATHNAME', 'pg_xxh3_128' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION xxh128(text) RETURNS varchar(32) AS 'MODULE_PATHNAME', 'pg_xxh3_128' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- alias
-- functions that return bytea (like sha256())
CREATE OR REPLACE FUNCTION xxh32b(text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_xxh32b' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION xxh64b(text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_xxh64b' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION xxh3_64b(text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_xxh3_64b' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION xxh3_128b(text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_xxh3_128b' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION xxh128b(text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_xxh3_128b' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- alias