hs.hsadmin.ng/src/main/resources/db/changelog/0-basis/006-numeric-hash-functions.sql
Michael Hoennig 87af20a3a1 structured-liquibase-files (#29)
Co-authored-by: Michael Hoennig <michael@hoennig.de>
Reviewed-on: #29
Reviewed-by: Timotheus Pokorra <timotheus.pokorra@hostsharing.net>
2024-04-02 12:29:31 +02:00

13 lines
399 B
PL/PgSQL

--liquibase formatted sql
-- ============================================================================
-- NUMERIC-HASH-FUNCTIONS
--changeset numeric-hash-functions:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
create function bigIntHash(text) returns bigint as $$
select ('x'||substr(md5($1),1,16))::bit(64)::bigint;
$$ language sql;
--//