diff flys-backend/ChangeLog @ 755:a29fd0916803

Added a new view to select qs of a WST. flys-backend/trunk@1988 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 24 May 2011 11:12:59 +0000
parents 5bcf338eadb9
children ca13926b8871
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Tue May 24 10:49:14 2011 +0000
+++ b/flys-backend/ChangeLog	Tue May 24 11:12:59 2011 +0000
@@ -1,3 +1,20 @@
+2011-05-24	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* doc/schema/postgresql.sql: Added a new view to select qs of a WST.
+	  To update existing databases:
+
+	    CREATE VIEW wst_q_values AS
+	        SELECT wc.position AS column_pos,
+	               wqr.q       AS q, 
+	               r.a         AS a, 
+	               r.b         AS b,
+	               wc.wst_id   AS wst_id
+	        FROM wst_column_q_ranges wcqr
+	        JOIN wst_q_ranges wqr ON wcqr.wst_q_range_id = wqr.id
+	        JOIN ranges r         ON wqr.range_id        = r.id
+	        JOIN wst_columns wc   ON wcqr.wst_column_id  = wc.id
+	        ORDER BY wc.position, wcqr.wst_column_id, r.a;	  
+
 2011-05-24	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* doc/schema/postgresql.sql: Added a new view to select ws of a WST.

http://dive4elements.wald.intevation.org