Show
Ignore:
Timestamp:
10/20/09 21:27:53 (9 years ago)
Author:
Robert Treat <robert@omniti.com>
git-committer:
Robert Treat <robert@omniti.com> 1256074073 +0000
git-parent:

[b4c0bb19ecdfe7283237a73c2e71a43d343e4210]

git-author:
Robert Treat <robert@omniti.com> 1256074073 +0000
Message:

trigger function updates for metric name summary management

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sql/sprocs/noit.update_mns_via_check_tag.sql

    rae19db0 rf0400f8  
    11-- formerly stratcon.trig_update_tsvector_from_check_tags() 
    22 
    3 CREATE OR REPLACE FUNCTION noit.update_mns_via_check_tag() 
    4   RETURNS trigger AS 
     3set search_path = noit, pg_catalog; 
     4 
     5CREATE OR REPLACE FUNCTION update_mns_via_check_tag() 
     6RETURNS trigger AS 
    57$BODY$ 
    6 DECLARE 
    78BEGIN 
    8     UPDATE noit.metric_name_summary SET fts_data=stratcon.metric_name_summary_tsvector(NEW.sid,metric_name,metric_type) 
    9     where sid=NEW.sid; 
    10    RETURN NEW; 
     9    UPDATE metric_name_summary SET fts_data=stratcon.metric_name_summary_compile_fts_data(NEW.sid,metric_name,metric_type) WHERE sid=NEW.sid; 
     10    RETURN NEW; 
    1111END 
    1212$BODY$ 
    13   LANGUAGE 'plpgsql'   SECURITY DEFINER; 
     13LANGUAGE 'plpgsql'  
     14SECURITY DEFINER; 
    1415 
    15 GRANT EXECUTE ON FUNCTION noit.update_mns_via_check_tag() TO stratcon;