[Collab-qa-commits] r1810 - udd/sql
Lucas Nussbaum
lucas at alioth.debian.org
Sat Sep 25 10:39:49 UTC 2010
Author: lucas
Date: 2010-09-25 10:39:48 +0000 (Sat, 25 Sep 2010)
New Revision: 1810
Modified:
udd/sql/setup.sql
Log:
add relevant_hints view
Modified: udd/sql/setup.sql
===================================================================
--- udd/sql/setup.sql 2010-09-25 10:39:27 UTC (rev 1809)
+++ udd/sql/setup.sql 2010-09-25 10:39:48 UTC (rev 1810)
@@ -741,3 +741,14 @@
type text, file text, comment text);
CREATE INDEX hints_idx on hints(source, version);
GRANT SELECT ON hints TO public;
+
+DROP VIEW relevant_hints;
+CREATE VIEW relevant_hints AS
+ SELECT source, version, architecture, type, file, comment FROM hints
+ WHERE version is NULL
+ OR type = 'approve'
+ OR (type IN ('unblock', 'age-days', 'hint', 'easy') AND (source, version) IN (select source, version from sources where release='sid'))
+ OR (type IN ('remove') AND (source, version) IN (select source, version from sources where release='squeeze')) ;
+GRANT SELECT ON relevant_hints TO public;
+
+SELECT * from hints where (source, version, type) not in (select source, version, type from relevant_hints);
More information about the Collab-qa-commits
mailing list