1 Index: create_views.sql
2 ===================================================================
3 --- create_views.sql (revisjon 2221)
4 +++ create_views.sql (arbeidskopi)
6 -- Lister ut events sammen med loggen.
7 CREATE OR REPLACE VIEW ev AS
9 + SELECT 'gps' AS flag, date, (coor[0]::numeric || ',' || coor[1]::numeric)::point as coor, sted || ' (' || dist || ')' AS sted, ele::numeric(8,1), NULL AS descr, avst
12 + -- SELECT 'event' AS flag, date, coor[0] || ',' || coor[1], NULL, NULL, descr AS descr, NULL
15 + -- SELECT 'pic' AS flag, date, coor[0] || ',' || coor[1], filename, NULL, NULL, NULL
19 +CREATE OR REPLACE VIEW flev AS
21 SELECT 'gps' AS flag, date, coor, sted || ' (' || dist || ')' AS sted, ele::numeric(8,1), NULL AS descr, avst
25 SELECT 'event' AS flag, date, coor, NULL, NULL, descr AS descr, NULL
28 SELECT 'pic' AS flag, date, coor, filename, NULL, NULL, NULL
31 + WHERE date between '2007-11-01' and '2007-12-01'
33 +CREATE OR REPLACE VIEW evmer AS
35 + SELECT 'gps' AS flag, date, coor, sted || ' (' || dist || ')' AS sted, ele::numeric(8,1), NULL AS descr, avst
38 + SELECT 'event' AS flag, date, coor, NULL, NULL, descr AS descr, NULL
41 + SELECT 'pic' AS flag, date, coor, filename, NULL, NULL, NULL
44 + WHERE date between '2007-11-01' and '2007-12-01'
47 CREATE OR REPLACE VIEW wp AS