comparison flys-backend/doc/schema/postgresql.sql @ 3470:3442304b430a

Adjusted official lines views schemata to include wst column pos. flys-backend/trunk@5031 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 18 Jul 2012 09:24:51 +0000
parents 790c12c55abb
children 61195d14b844
comparison
equal deleted inserted replaced
3469:09e906487024 3470:3442304b430a
362 CREATE VIEW official_lines 362 CREATE VIEW official_lines
363 AS 363 AS
364 SELECT w.river_id AS river_id, 364 SELECT w.river_id AS river_id,
365 w.id AS wst_id, 365 w.id AS wst_id,
366 wc.id AS wst_column_id, 366 wc.id AS wst_column_id,
367 wc.name AS name 367 wc.name AS name,
368 wc.position AS wst_column_pos
368 FROM wsts w 369 FROM wsts w
369 JOIN wst_columns wc 370 JOIN wst_columns wc
370 ON wc.wst_id = w.id 371 ON wc.wst_id = w.id
371 WHERE w.kind = 3; 372 WHERE w.kind = 3;
372 373
402 gauge_id, 403 gauge_id,
403 gauge_name, 404 gauge_name,
404 a, 405 a,
405 b, 406 b,
406 ol.name, 407 ol.name,
407 value 408 value,
409 wst_column_pos
408 FROM official_lines ol 410 FROM official_lines ol
409 JOIN q_main_values qmv 411 JOIN q_main_values qmv
410 ON ol.river_id = qmv.river_id 412 ON ol.river_id = qmv.river_id
411 AND ol.name = qmv.name; 413 AND ol.name = qmv.name;
412 414

http://dive4elements.wald.intevation.org