Revision 160f109b15a45dee37cf9562d326955abc3729d0 authored by Nicolas Dandrimont on 11 October 2017, 15:39:29 UTC, committed by Nicolas Dandrimont on 11 October 2017, 15:39:29 UTC
2 parent s 1089069 + b8f5018
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