[Collab-qa-commits] r1886 - udd/sql
Andreas Tille
tille at alioth.debian.org
Wed Jan 12 15:36:37 UTC 2011
Author: tille
Date: 2011-01-12 15:36:32 +0000 (Wed, 12 Jan 2011)
New Revision: 1886
Modified:
udd/sql/blends-query-packages.sql
Log:
Add changed_by info from upload_history
Modified: udd/sql/blends-query-packages.sql
===================================================================
--- udd/sql/blends-query-packages.sql 2011-01-12 13:30:09 UTC (rev 1885)
+++ udd/sql/blends-query-packages.sql 2011-01-12 15:36:32 UTC (rev 1886)
@@ -9,6 +9,7 @@
p.source, p.section, task, p.homepage,
src.maintainer_name, src.maintainer_email,
src.vcs_type, src.vcs_url, src.vcs_browser,
+ src.changed_by,
p.enhances,
rva.releases, versions, rva.architectures,
unstable_upstream, unstable_parsed_version, unstable_status, experimental_parsed_version, experimental_status,
@@ -74,8 +75,13 @@
WHERE pkg.package = ANY ($1)
GROUP BY pkg.package, pkg.architecture, pkg.version
) pvar ON pvar.package = p.package AND pvar.version = p.version AND pvar.architecture = p.architecture AND pvar.release = p.release
- -- extract source
- JOIN sources src ON src.source = p.source
+ -- extract source and join with upload_history to find out latest uploader if different from Maintainer
+ JOIN (
+ SELECT s.source, s.version, s.maintainer, s.release, s.maintainer_name, s.maintainer_email, s.vcs_type, s.vcs_url, s.vcs_browser,
+ CASE WHEN uh.changed_by != s.maintainer THEN uh.changed_by ELSE NULL END AS changed_by
+ FROM sources s
+ LEFT OUTER JOIN upload_history uh ON s.source = uh.source AND s.version = uh.version
+ ) src ON src.source = p.source
-- AND src.version = p.version -- this excludes packages whith binary only uploads
AND src.release = p.release
-- join with sets of avialable versions in different releases
More information about the Collab-qa-commits
mailing list