* /trunk/src/gpstools/postgres/create_views.sql
[gpstools.git] / postgres / create_table.sql
blobbbbd6a2127d1c844322a7bbb12ca4e8bcd4a61da
1 -- $Id$
3 CREATE TABLE logg (
4     date timestamptz,
5     coor point,
6     ele numeric,
7     name text,
8     dist numeric(8, 5),
9     description text,
10     id serial
13 CREATE TABLE wayp (
14     coor point,
15     name text,
16     ele numeric(6, 1),
17     type text,
18     time timestamptz,
19     cmt text, -- GPS waypoint comment. Sent to the GPS as comment.
20     descr text, -- A text description. Additional info intended for the user, not the GPS.
21     src text,
22     sym text,
23     id integer
26 CREATE TABLE wayp_new (
27     coor point,
28     name text,
29     ele numeric(6, 1),
30     type text,
31     time timestamptz,
32     cmt text, -- GPS waypoint comment. Sent to the GPS as comment.
33     descr text, -- A text description. Additional info intended for the user, not the GPS.
34     src text,
35     sym text,
36     id serial
39 CREATE TABLE wayp_rej (
40     coor point,
41     name text,
42     ele numeric(6, 1),
43     type text,
44     time timestamptz,
45     cmt text, -- GPS waypoint comment. Sent to the GPS as comment.
46     descr text, -- A text description. Additional info intended for the user, not the GPS.
47     src text,
48     sym text,
49     id integer
52 CREATE TABLE tmpwayp AS
53     SELECT * FROM wayp LIMIT 0;
55 CREATE TABLE events (
56     date timestamptz,
57     coor point,
58     descr text,
59     begindate timestamptz, -- Ganske eksakt tidspunt ved start
60     enddate timestamptz, -- Ganske eksakt tidspunkt ved slutt
61     cabegin interval,
62     caend interval,
63     flags text[],
64     persons text[],
65     data bytea
68 CREATE TABLE pictures (
69     version smallint,
70     date timestamptz,
71     coor point,
72     descr text,
73     filename text,
74     author text
77 CREATE TABLE stat (
78     lastupdate timestamptz,
79     lastname timestamptz