root/sql/sprocs/noit.update_mns_via_metric_tag.sql

Revision ae19db0fd28c28eccecf646249d15a8ad3bd6851, 481 bytes (checked in by Denish Patel <denish@omniti.com>, 5 years ago)

Updated trigger functions related to metric_name_summary as we changed column name from ts_search_all to fts_data

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