store dslam data in hstore
[APKPM.git] / sql / dslam_h.sql
diff --git a/sql/dslam_h.sql b/sql/dslam_h.sql
new file mode 100644 (file)
index 0000000..49f2bd9
--- /dev/null
@@ -0,0 +1,14 @@
+-- include hstore
+\i /usr/share/postgresql/8.4/contrib/hstore.sql
+
+create table dslam_h (
+ip inet not null,
+username text not null,
+timestamp timestamp default now(),
+h hstore
+);
+
+-- columns used in where for gnuplot
+create index dslam_h_username on dslam_h(username);
+create index dslam_h_timestamp on dslam_h(timestamp) ;
+