Page MenuHomeSoftware Heritage
Paste P104

provenance - populate caches (dev) - compatible schema v085
ActivePublic

Authored by ardumont on Sep 1 2016, 6:40 PM.
create or replace function populate_provenance_caches()
returns void
language plpgsql
as $$
declare
rev sha1_git;
ori bigint;
vis bigint;
begin
-- cache population for cache_content_revision
perform swh_mktemp_bytea();
insert into tmp_bytea (select id from revision);
perform swh_cache_content_revision_add();
-- cache population for cache_content_revision
for ori, vis in (select origin, visit from origin_visit)
loop
perform swh_cache_revision_origin_add(ori, vis);
end loop;
return;
end
$$;

Event Timeline

ardumont changed the title of this paste from provenance - populate caches (only for dev) to provenance - populate caches (dev) - compatible schema v085.