Revision f681f83cdd8474e598a6c3a0fe8da28c5373b48e authored by Antoine R. Dumont (@ardumont) on 01 June 2017, 08:50:13 UTC, committed by Antoine R. Dumont (@ardumont) on 02 June 2017, 14:20:45 UTC
1 parent 08827dc
Raw File
swh-init.sql
create extension if not exists btree_gist;
create extension if not exists pgcrypto;

create or replace language plpgsql;
create or replace language plpython3u;

create or replace function hash_sha1(text)
       returns text
as $$
   select encode(digest($1, 'sha1'), 'hex')
$$ language sql strict immutable;

comment on function hash_sha1(text) is 'Compute sha1 hash as text';
back to top