root/sql/sprocs/noit.update_mns_via_metric_tag.sql

Revision f0400f824c10ceac576427c5023429506384cd8a, 433 bytes (checked in by Robert Treat <robert@omniti.com>, 5 years ago)

trigger function updates for metric name summary management

  • Property mode set to 100644
Line 
1 -- formerly stratcon.trig_update_tsvector_from_metric_tags
2
3 set search_path = noit, pg_catalog;
4
5 CREATE OR REPLACE FUNCTION update_mns_via_metric_tag()
6 RETURNS trigger AS
7 $BODY$
8 BEGIN
9     UPDATE metric_name_summary SET fts_data=stratcon.metric_name_summary_compile_fts_data(NEW.sid,NEW.metric_name,metric_type)
10     WHERE sid=NEW.sid AND metric_name=NEW.metric_name;
11    RETURN NEW;
12 END
13 $BODY$
14 LANGUAGE 'plpgsql'
15 SECURITY DEFINER;
16  
Note: See TracBrowser for help on using the browser.