Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • douardda/swh-storage
  • anlambert/swh-storage
  • vlorentz/swh-storage
  • franckbret/swh-storage
  • lunar/swh-storage
  • olasd/swh-storage
  • jayeshv/swh-storage
  • vsellier/swh-storage
  • swh/devel/swh-storage
  • Alphare/swh-storage
  • martin/swh-storage
  • ardumont/swh-storage
  • samplet/swh-storage
  • marmoute/swh-storage
14 results
Show changes
Commits on Source (3)
......@@ -144,7 +144,8 @@ create or replace function swh_content_add()
as $$
begin
insert into content (sha1, sha1_git, sha256, blake2s256, length, status, ctime)
select distinct sha1, sha1_git, sha256, blake2s256, length, status, ctime from tmp_content;
select distinct sha1, sha1_git, sha256, blake2s256, length, status, ctime from tmp_content
order by sha1;
return;
end
$$;
......@@ -161,11 +162,12 @@ as $$
begin
insert into skipped_content (sha1, sha1_git, sha256, blake2s256, length, status, reason, origin)
select distinct sha1, sha1_git, sha256, blake2s256, length, status, reason, origin
from tmp_skipped_content
where (coalesce(sha1, ''), coalesce(sha1_git, ''), coalesce(sha256, '')) in (
from tmp_skipped_content
where (coalesce(sha1, ''), coalesce(sha1_git, ''), coalesce(sha256, '')) in (
select coalesce(sha1, ''), coalesce(sha1_git, ''), coalesce(sha256, '')
from swh_skipped_content_missing()
);
)
order by sha1, sha1_git, sha256, blake2s256;
-- TODO XXX use postgres 9.5 "UPSERT" support here, when available.
-- Specifically, using "INSERT .. ON CONFLICT IGNORE" we can avoid
-- the extra swh_skipped_content_missing() query here.
......@@ -228,7 +230,7 @@ begin
select 1
from directory_entry_%1$s i
where t.target = i.target and t.name = i.name and t.perms = i.perms
)
order by target, name
on conflict
do nothing
;
......@@ -572,7 +574,8 @@ begin
select 1
from person p
where t.fullname = p.fullname
);
)
order by fullname;
return;
end
$$;
......@@ -590,7 +593,8 @@ begin
select t.id, t.date, t.date_offset, t.date_neg_utc_offset, t.date_offset_bytes, t.committer_date, t.committer_date_offset, t.committer_date_neg_utc_offset, t.committer_date_offset_bytes, t.type, t.directory, t.message, a.id, c.id, t.metadata, t.synthetic, t.extra_headers, t.raw_manifest
from tmp_revision t
left join person a on a.fullname = t.author_fullname
left join person c on c.fullname = t.committer_fullname;
left join person c on c.fullname = t.committer_fullname
order by t.id;
return;
end
$$;
......@@ -628,7 +632,8 @@ begin
select 1
from person p
where t.fullname = p.fullname
);
)
order by fullname;
return;
end
$$;
......@@ -646,7 +651,8 @@ begin
select distinct t.id, t.target, t.target_type, t.date, t.date_offset, t.date_neg_utc_offset, t.date_offset_bytes, t.name, t.comment, a.id, t.synthetic, t.raw_manifest
from tmp_release t
left join person a on a.fullname = t.author_fullname
where not exists (select 1 from release where t.id = release.id);
where not exists (select 1 from release where t.id = release.id)
order by t.id;
return;
end
$$;
......