[Collab-qa-commits] r1885 - udd/sql
Andreas Tille
tille at alioth.debian.org
Wed Jan 12 13:30:11 UTC 2011
Author: tille
Date: 2011-01-12 13:30:09 +0000 (Wed, 12 Jan 2011)
New Revision: 1885
Modified:
udd/sql/blends-query-packages.sql
Log:
Avoid duplicates, define order of releases
Modified: udd/sql/blends-query-packages.sql
===================================================================
--- udd/sql/blends-query-packages.sql 2011-01-11 22:34:21 UTC (rev 1884)
+++ udd/sql/blends-query-packages.sql 2011-01-12 13:30:09 UTC (rev 1885)
@@ -3,7 +3,7 @@
************************************************************************************/
CREATE OR REPLACE FUNCTION blends_query_packages (text[]) RETURNS SETOF RECORD AS $$
- SELECT
+ SELECT DISTINCT
p.package, p.distribution, p.release, p.component, p.version,
p.architecture, p.maintainer,
p.source, p.section, task, p.homepage,
@@ -98,6 +98,7 @@
GROUP BY package, version, release, distribution, component
) p
JOIN releases ON releases.release = p.release
+ ORDER BY releases.sort, version
) tmp GROUP BY package
) rva
ON p.package = rva.package
More information about the Collab-qa-commits
mailing list