[Collab-qa-commits] r1892 - udd/sql
Andreas Tille
tille at alioth.debian.org
Sat Jan 15 18:13:46 UTC 2011
Author: tille
Date: 2011-01-15 18:13:40 +0000 (Sat, 15 Jan 2011)
New Revision: 1892
Modified:
udd/sql/blends-query-packages.sql
Log:
Better prevention of duplicate entries
Modified: udd/sql/blends-query-packages.sql
===================================================================
--- udd/sql/blends-query-packages.sql 2011-01-15 17:55:32 UTC (rev 1891)
+++ udd/sql/blends-query-packages.sql 2011-01-15 18:13:40 UTC (rev 1892)
@@ -111,8 +111,8 @@
LEFT OUTER JOIN upload_history uh ON s.source = uh.source AND s.version = uh.version
) src ON src.source = p.source AND src.source = ps.source
AND src.release = p.release
- AND ps.version = p.version
- AND ps.maintainer_email = src.maintainer_email -- we really mean the same upload
+ AND ( ( ps.version = p.version AND ps.version != ps.source_version ) OR
+ ( ps.version = p.version AND src.version = p.version) )
-- join with sets of avialable versions in different releases
JOIN (
SELECT package, array_agg(release) AS releases,
More information about the Collab-qa-commits
mailing list