From 4f6f18fc3ad0f0a62f0db20e3e6e8d5a2bb190bf Mon Sep 17 00:00:00 2001
From: Random Hacker <random_hacker@xapek.org>
Date: Mon, 5 Dec 2011 22:47:24 +0100
Subject: use current_timestamp; add notify

---
 sql/trigger.sql | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'sql/trigger.sql')

diff --git a/sql/trigger.sql b/sql/trigger.sql
index fb60617..ce91f61 100644
--- a/sql/trigger.sql
+++ b/sql/trigger.sql
@@ -39,6 +39,8 @@ CREATE FUNCTION value_insert_trigger_func() RETURNS trigger AS $$
            AND sensor_id  = (SELECT sensor_id FROM value WHERE id = (SELECT MAX(id) FROM value))
           GROUP BY type, sensor_id, date_trunc('hour', timestamp);               
 
+    NOTIFY evt_ebus_value_insert;
+ 
     RETURN NULL;
         END;
 $$ LANGUAGE plpgsql;
-- 
cgit v1.2.1

