diff options
author | Random Hacker <random_hacker@xapek.org> | 2011-12-05 22:47:24 +0100 |
---|---|---|
committer | Random Hacker <random_hacker@xapek.org> | 2011-12-05 22:47:24 +0100 |
commit | 4f6f18fc3ad0f0a62f0db20e3e6e8d5a2bb190bf (patch) | |
tree | 6bfd35d2d61ee77dba8169afe24ca5d935d60803 /sql/trigger.sql | |
parent | f7728b15fdea96376feea5daa187a7afb9ce6802 (diff) | |
download | ebus-alt-4f6f18fc3ad0f0a62f0db20e3e6e8d5a2bb190bf.tar.gz ebus-alt-4f6f18fc3ad0f0a62f0db20e3e6e8d5a2bb190bf.zip |
use current_timestamp; add notify
Diffstat (limited to 'sql/trigger.sql')
-rw-r--r-- | sql/trigger.sql | 2 |
1 files changed, 2 insertions, 0 deletions
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; |