gpsfold: Remove $Id$ at EOF.
[gpstools.git] / branches / gpst.gpsman-format / Patch / files.patch
blob8733a71a602916a3788c229fcc8dcd506a2013ff
1 Index: postgres/create_table.sql
2 ===================================================================
3 --- postgres/create_table.sql (revisjon 2229)
4 +++ postgres/create_table.sql (arbeidskopi)
5 @@ -46,6 +46,17 @@
6 author text
7 );
9 +CREATE TABLE files (
10 + mtime timestamptz,
11 + coor point,
12 + filename text,
13 + descr text,
14 + size bigint,
15 + sha1 varchar(40),
16 + md5 varchar(40),
17 + path text
18 +);
20 CREATE TABLE stat (
21 lastupdate timestamptz,
22 laststed timestamptz
23 Index: postgres/create_views.sql
24 ===================================================================
25 --- postgres/create_views.sql (revisjon 2229)
26 +++ postgres/create_views.sql (arbeidskopi)
27 @@ -133,6 +133,22 @@
28 ) AS u
29 ORDER BY date;
31 +CREATE OR REPLACE VIEW evfiles AS
32 + SELECT * FROM (
33 + SELECT 'gps' AS flag, date, coor, sted || ' (' || dist || ')' AS sted, ele::numeric(8,1), NULL AS descr, avst
34 + FROM logg
35 + UNION ALL
36 + SELECT 'event' AS flag, date, coor, NULL, NULL, descr AS descr, NULL
37 + FROM events
38 + UNION ALL
39 + SELECT 'pic' AS flag, date, coor, filename, NULL, NULL, NULL
40 + FROM pictures
41 + UNION ALL
42 + SELECT 'file' AS flag, mtime, coor, filename, NULL, path, NULL
43 + FROM files
44 + ) AS u
45 + ORDER BY date;
47 CREATE OR REPLACE VIEW wp AS
48 SELECT
49 coor AS coor,