Changeset 75075e2a62f4974e24117f519581ad75b2a083c4

Show
Ignore:
Timestamp:
09/24/08 20:45:15 (6 years ago)
Author:
Denish Patel <denish@omniti.com>
git-committer:
Denish Patel <denish@omniti.com> 1222289115 +0000
git-parent:

[f3544432ddf95a1f7eabd18d8fa0f355191362eb]

git-author:
Denish Patel <denish@omniti.com> 1222289115 +0000
Message:

Moved metric_tags from prism schema to stratcon and grant all table to prism, modified all functions,triggers to reflect the changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sql/reconnoiter_ddl_dump.sql

    rf354443 r75075e2  
    4141 
    4242SET default_with_oids = false; 
    43  
    44 -- 
    45 -- Name: metric_tags; Type: TABLE; Schema: prism; Owner: reconnoiter; Tablespace:  
    46 -- 
    47  
    48 CREATE TABLE metric_tags ( 
    49     sid integer NOT NULL, 
    50     metric_name text NOT NULL, 
    51     metric_type character varying(22), 
    52     tags_array text[] 
    53 ); 
    54  
    55  
    56 ALTER TABLE prism.metric_tags OWNER TO reconnoiter; 
    5743 
    5844-- 
     
    401387 
    402388ALTER TABLE stratcon.metric_name_summary OWNER TO reconnoiter; 
     389 
     390-- 
     391-- Name: metric_tags; Type: TABLE; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     392-- 
     393 
     394CREATE TABLE metric_tags ( 
     395    sid integer NOT NULL, 
     396    metric_name text NOT NULL, 
     397    metric_type character varying(22), 
     398    tags_array text[] 
     399); 
     400 
     401 
     402ALTER TABLE stratcon.metric_tags OWNER TO reconnoiter; 
    403403 
    404404-- 
     
    525525     v_tags_array:= string_to_array(in_tags,''); 
    526526     SELECT sid into p_sid  
    527       FROM prism.metric_tags  
     527      FROM stratcon.metric_tags  
    528528      WHERE sid=in_sid AND metric_name=in_metric_name AND metric_type=in_metric_type; 
    529529     IF NOT FOUND THEN 
     
    534534               RAISE EXCEPTION 'Metric does not exist in metric_name_summary table'; 
    535535          ELSE  
    536          INSERT INTO prism.metric_tags (sid,metric_name,metric_type,tags_array) values(v_sid, v_metric_name,v_metric_typle,v_tags_array); 
     536         INSERT INTO stratcon.metric_tags (sid,metric_name,metric_type,tags_array) values(v_sid, v_metric_name,v_metric_typle,v_tags_array); 
    537537      END IF; 
    538538     ELSE 
    539539       SELECT tags_array INTO p_tags_array  
    540           FROM prism.metric_tags  
     540          FROM stratcon.metric_tags  
    541541          WHERE sid=in_sid AND metric_name=in_metric_name AND metric_type=in_metric_type; 
    542542             new_tags_array:= array_append(p_tags_array, in_tags); 
    543            UPDATE  prism.metric_tags SET tags_array= new_tags_array WHERE sid=in_sid AND metric_name=in_metric_name AND metric_type=in_metric_type;           
     543           UPDATE  stratcon.metric_tags SET tags_array= new_tags_array WHERE sid=in_sid AND metric_name=in_metric_name AND metric_type=in_metric_type;           
    544544    END IF; 
    545545  RETURN; 
     
    585585   v_tags_array:= string_to_array(in_tags,''); 
    586586     SELECT sid,tags_array into p_sid ,p_tags_array 
    587       FROM prism.metric_tags  
     587      FROM stratcon.metric_tags  
    588588      WHERE sid=in_sid AND metric_name=in_metric_name AND metric_type=in_metric_type; 
    589589     IF NOT FOUND THEN 
     
    598598         END LOOP; 
    599599        
    600            UPDATE  prism.metric_tags SET tags_array= new_tags_array WHERE sid=in_sid AND metric_name=in_metric_name AND metric_type=in_metric_type;           
     600           UPDATE  stratcon.metric_tags SET tags_array= new_tags_array WHERE sid=in_sid AND metric_name=in_metric_name AND metric_type=in_metric_type;           
    601601    END IF; 
    602602  RETURN; 
     
    607607 
    608608ALTER FUNCTION prism.remove_tags(in_sid integer, in_metric_name text, in_metric_type text, in_tags text) OWNER TO reconnoiter; 
    609  
    610 -- 
    611 -- Name: trig_update_tsvector_from_metric_tags(); Type: FUNCTION; Schema: prism; Owner: reconnoiter 
    612 -- 
    613  
    614 CREATE FUNCTION trig_update_tsvector_from_metric_tags() RETURNS trigger 
    615     AS $$ 
    616 DECLARE 
    617 BEGIN 
    618     UPDATE stratcon.metric_name_summary SET ts_search_all=stratcon.metric_name_summary_tsvector(NEW.sid,NEW.metric_name,NEW.metric_type); 
    619    RETURN NEW; 
    620 END 
    621 $$ 
    622     LANGUAGE plpgsql; 
    623  
    624  
    625 ALTER FUNCTION prism.trig_update_tsvector_from_metric_tags() OWNER TO reconnoiter; 
    626609 
    627610SET search_path = public, pg_catalog; 
     
    11761159 
    11771160    SELECT COALESCE(array_to_string(tags_array, ' '), ' ') INTO ref_tags 
    1178       FROM prism.metric_tags 
     1161      FROM stratcon.metric_tags 
    11791162     WHERE sid=in_sid and metric_name=in_metric_name and metric_type=in_metric_type; 
    11801163    IF NOT FOUND THEN 
     
    18881871 
    18891872-- 
     1873-- Name: trig_update_tsvector_from_metric_tags(); Type: FUNCTION; Schema: stratcon; Owner: reconnoiter 
     1874-- 
     1875 
     1876CREATE FUNCTION trig_update_tsvector_from_metric_tags() RETURNS trigger 
     1877    AS $$ 
     1878DECLARE 
     1879BEGIN 
     1880    UPDATE stratcon.metric_name_summary SET ts_search_all=stratcon.metric_name_summary_tsvector(NEW.sid,NEW.metric_name,NEW.metric_type)  
     1881    where sid=NEW.sid and metric_name=NEW.metric_name and metric_type = NEW.metric_type ; 
     1882   RETURN NEW; 
     1883END 
     1884$$ 
     1885    LANGUAGE plpgsql; 
     1886 
     1887 
     1888ALTER FUNCTION stratcon.trig_update_tsvector_from_metric_tags() OWNER TO reconnoiter; 
     1889 
     1890-- 
    18901891-- Name: trig_update_tsvector_from_mv_dock(); Type: FUNCTION; Schema: stratcon; Owner: reconnoiter 
    18911892-- 
     
    19531954 
    19541955-- 
    1955 -- Name: metric_tags_pk; Type: CONSTRAINT; Schema: prism; Owner: reconnoiter; Tablespace:  
     1956-- Name: saved_graphs_dep_pkey; Type: CONSTRAINT; Schema: prism; Owner: reconnoiter; Tablespace:  
     1957-- 
     1958 
     1959ALTER TABLE ONLY saved_graphs_dep 
     1960    ADD CONSTRAINT saved_graphs_dep_pkey PRIMARY KEY (graphid, sid, metric_name); 
     1961 
     1962 
     1963-- 
     1964-- Name: saved_graphs_pkey; Type: CONSTRAINT; Schema: prism; Owner: reconnoiter; Tablespace:  
     1965-- 
     1966 
     1967ALTER TABLE ONLY saved_graphs 
     1968    ADD CONSTRAINT saved_graphs_pkey PRIMARY KEY (graphid); 
     1969 
     1970 
     1971SET search_path = public, pg_catalog; 
     1972 
     1973-- 
     1974-- Name: pga_diagrams_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
     1975-- 
     1976 
     1977ALTER TABLE ONLY pga_diagrams 
     1978    ADD CONSTRAINT pga_diagrams_pkey PRIMARY KEY (diagramname); 
     1979 
     1980 
     1981-- 
     1982-- Name: pga_forms_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
     1983-- 
     1984 
     1985ALTER TABLE ONLY pga_forms 
     1986    ADD CONSTRAINT pga_forms_pkey PRIMARY KEY (formname); 
     1987 
     1988 
     1989-- 
     1990-- Name: pga_graphs_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
     1991-- 
     1992 
     1993ALTER TABLE ONLY pga_graphs 
     1994    ADD CONSTRAINT pga_graphs_pkey PRIMARY KEY (graphname); 
     1995 
     1996 
     1997-- 
     1998-- Name: pga_images_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
     1999-- 
     2000 
     2001ALTER TABLE ONLY pga_images 
     2002    ADD CONSTRAINT pga_images_pkey PRIMARY KEY (imagename); 
     2003 
     2004 
     2005-- 
     2006-- Name: pga_layout_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
     2007-- 
     2008 
     2009ALTER TABLE ONLY pga_layout 
     2010    ADD CONSTRAINT pga_layout_pkey PRIMARY KEY (tablename); 
     2011 
     2012 
     2013-- 
     2014-- Name: pga_queries_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
     2015-- 
     2016 
     2017ALTER TABLE ONLY pga_queries 
     2018    ADD CONSTRAINT pga_queries_pkey PRIMARY KEY (queryname); 
     2019 
     2020 
     2021-- 
     2022-- Name: pga_reports_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
     2023-- 
     2024 
     2025ALTER TABLE ONLY pga_reports 
     2026    ADD CONSTRAINT pga_reports_pkey PRIMARY KEY (reportname); 
     2027 
     2028 
     2029-- 
     2030-- Name: pga_scripts_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
     2031-- 
     2032 
     2033ALTER TABLE ONLY pga_scripts 
     2034    ADD CONSTRAINT pga_scripts_pkey PRIMARY KEY (scriptname); 
     2035 
     2036 
     2037SET search_path = stratcon, pg_catalog; 
     2038 
     2039-- 
     2040-- Name: current_metric_text_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2041-- 
     2042 
     2043ALTER TABLE ONLY current_metric_text 
     2044    ADD CONSTRAINT current_metric_text_pkey PRIMARY KEY (sid, name); 
     2045 
     2046 
     2047-- 
     2048-- Name: current_node_config_changelog_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2049-- 
     2050 
     2051ALTER TABLE ONLY current_node_config_changelog 
     2052    ADD CONSTRAINT current_node_config_changelog_pkey PRIMARY KEY (remote_address, node_type, whence); 
     2053 
     2054 
     2055-- 
     2056-- Name: current_node_config_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2057-- 
     2058 
     2059ALTER TABLE ONLY current_node_config 
     2060    ADD CONSTRAINT current_node_config_pkey PRIMARY KEY (remote_address, node_type); 
     2061 
     2062 
     2063-- 
     2064-- Name: loading_dock_check_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2065-- 
     2066 
     2067ALTER TABLE ONLY loading_dock_check_s 
     2068    ADD CONSTRAINT loading_dock_check_s_pkey PRIMARY KEY (sid, id, whence); 
     2069 
     2070 
     2071-- 
     2072-- Name: loading_dock_metric_numeric_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2073-- 
     2074 
     2075ALTER TABLE ONLY loading_dock_metric_numeric_s 
     2076    ADD CONSTRAINT loading_dock_metric_numeric_s_pkey PRIMARY KEY (whence, sid, name); 
     2077 
     2078ALTER TABLE loading_dock_metric_numeric_s CLUSTER ON loading_dock_metric_numeric_s_pkey; 
     2079 
     2080 
     2081-- 
     2082-- Name: loading_dock_metric_text_s_change_log_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2083-- 
     2084 
     2085ALTER TABLE ONLY loading_dock_metric_text_s_change_log 
     2086    ADD CONSTRAINT loading_dock_metric_text_s_change_log_pkey PRIMARY KEY (whence, sid, name); 
     2087 
     2088 
     2089-- 
     2090-- Name: loading_dock_metric_text_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2091-- 
     2092 
     2093ALTER TABLE ONLY loading_dock_metric_text_s 
     2094    ADD CONSTRAINT loading_dock_metric_text_s_pkey PRIMARY KEY (whence, sid, name); 
     2095 
     2096 
     2097-- 
     2098-- Name: loading_dock_status_s_change_log_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2099-- 
     2100 
     2101ALTER TABLE ONLY loading_dock_status_s_change_log 
     2102    ADD CONSTRAINT loading_dock_status_s_change_log_pkey PRIMARY KEY (sid, whence); 
     2103 
     2104 
     2105-- 
     2106-- Name: loading_dock_status_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2107-- 
     2108 
     2109ALTER TABLE ONLY loading_dock_status_s 
     2110    ADD CONSTRAINT loading_dock_status_s_pkey PRIMARY KEY (sid, whence); 
     2111 
     2112 
     2113-- 
     2114-- Name: log_whence_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2115-- 
     2116 
     2117ALTER TABLE ONLY log_whence_s 
     2118    ADD CONSTRAINT log_whence_s_pkey PRIMARY KEY (whence, "interval"); 
     2119 
     2120 
     2121-- 
     2122-- Name: map_uuid_to_sid_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2123-- 
     2124 
     2125ALTER TABLE ONLY map_uuid_to_sid 
     2126    ADD CONSTRAINT map_uuid_to_sid_pkey PRIMARY KEY (id, sid); 
     2127 
     2128 
     2129-- 
     2130-- Name: metric_name_summary_pk; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2131-- 
     2132 
     2133ALTER TABLE ONLY metric_name_summary 
     2134    ADD CONSTRAINT metric_name_summary_pk UNIQUE (sid, metric_name, metric_type); 
     2135 
     2136 
     2137-- 
     2138-- Name: metric_tags_pk; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    19562139-- 
    19572140 
    19582141ALTER TABLE ONLY metric_tags 
    19592142    ADD CONSTRAINT metric_tags_pk UNIQUE (sid, metric_name, metric_type); 
    1960  
    1961  
    1962 -- 
    1963 -- Name: saved_graphs_dep_pkey; Type: CONSTRAINT; Schema: prism; Owner: reconnoiter; Tablespace:  
    1964 -- 
    1965  
    1966 ALTER TABLE ONLY saved_graphs_dep 
    1967     ADD CONSTRAINT saved_graphs_dep_pkey PRIMARY KEY (graphid, sid, metric_name); 
    1968  
    1969  
    1970 -- 
    1971 -- Name: saved_graphs_pkey; Type: CONSTRAINT; Schema: prism; Owner: reconnoiter; Tablespace:  
    1972 -- 
    1973  
    1974 ALTER TABLE ONLY saved_graphs 
    1975     ADD CONSTRAINT saved_graphs_pkey PRIMARY KEY (graphid); 
    1976  
    1977  
    1978 SET search_path = public, pg_catalog; 
    1979  
    1980 -- 
    1981 -- Name: pga_diagrams_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
    1982 -- 
    1983  
    1984 ALTER TABLE ONLY pga_diagrams 
    1985     ADD CONSTRAINT pga_diagrams_pkey PRIMARY KEY (diagramname); 
    1986  
    1987  
    1988 -- 
    1989 -- Name: pga_forms_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
    1990 -- 
    1991  
    1992 ALTER TABLE ONLY pga_forms 
    1993     ADD CONSTRAINT pga_forms_pkey PRIMARY KEY (formname); 
    1994  
    1995  
    1996 -- 
    1997 -- Name: pga_graphs_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
    1998 -- 
    1999  
    2000 ALTER TABLE ONLY pga_graphs 
    2001     ADD CONSTRAINT pga_graphs_pkey PRIMARY KEY (graphname); 
    2002  
    2003  
    2004 -- 
    2005 -- Name: pga_images_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
    2006 -- 
    2007  
    2008 ALTER TABLE ONLY pga_images 
    2009     ADD CONSTRAINT pga_images_pkey PRIMARY KEY (imagename); 
    2010  
    2011  
    2012 -- 
    2013 -- Name: pga_layout_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
    2014 -- 
    2015  
    2016 ALTER TABLE ONLY pga_layout 
    2017     ADD CONSTRAINT pga_layout_pkey PRIMARY KEY (tablename); 
    2018  
    2019  
    2020 -- 
    2021 -- Name: pga_queries_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
    2022 -- 
    2023  
    2024 ALTER TABLE ONLY pga_queries 
    2025     ADD CONSTRAINT pga_queries_pkey PRIMARY KEY (queryname); 
    2026  
    2027  
    2028 -- 
    2029 -- Name: pga_reports_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
    2030 -- 
    2031  
    2032 ALTER TABLE ONLY pga_reports 
    2033     ADD CONSTRAINT pga_reports_pkey PRIMARY KEY (reportname); 
    2034  
    2035  
    2036 -- 
    2037 -- Name: pga_scripts_pkey; Type: CONSTRAINT; Schema: public; Owner: reconnoiter; Tablespace:  
    2038 -- 
    2039  
    2040 ALTER TABLE ONLY pga_scripts 
    2041     ADD CONSTRAINT pga_scripts_pkey PRIMARY KEY (scriptname); 
    2042  
    2043  
    2044 SET search_path = stratcon, pg_catalog; 
    2045  
    2046 -- 
    2047 -- Name: current_metric_text_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2048 -- 
    2049  
    2050 ALTER TABLE ONLY current_metric_text 
    2051     ADD CONSTRAINT current_metric_text_pkey PRIMARY KEY (sid, name); 
    2052  
    2053  
    2054 -- 
    2055 -- Name: current_node_config_changelog_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2056 -- 
    2057  
    2058 ALTER TABLE ONLY current_node_config_changelog 
    2059     ADD CONSTRAINT current_node_config_changelog_pkey PRIMARY KEY (remote_address, node_type, whence); 
    2060  
    2061  
    2062 -- 
    2063 -- Name: current_node_config_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2064 -- 
    2065  
    2066 ALTER TABLE ONLY current_node_config 
    2067     ADD CONSTRAINT current_node_config_pkey PRIMARY KEY (remote_address, node_type); 
    2068  
    2069  
    2070 -- 
    2071 -- Name: loading_dock_check_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2072 -- 
    2073  
    2074 ALTER TABLE ONLY loading_dock_check_s 
    2075     ADD CONSTRAINT loading_dock_check_s_pkey PRIMARY KEY (sid, id, whence); 
    2076  
    2077  
    2078 -- 
    2079 -- Name: loading_dock_metric_numeric_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2080 -- 
    2081  
    2082 ALTER TABLE ONLY loading_dock_metric_numeric_s 
    2083     ADD CONSTRAINT loading_dock_metric_numeric_s_pkey PRIMARY KEY (whence, sid, name); 
    2084  
    2085 ALTER TABLE loading_dock_metric_numeric_s CLUSTER ON loading_dock_metric_numeric_s_pkey; 
    2086  
    2087  
    2088 -- 
    2089 -- Name: loading_dock_metric_text_s_change_log_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2090 -- 
    2091  
    2092 ALTER TABLE ONLY loading_dock_metric_text_s_change_log 
    2093     ADD CONSTRAINT loading_dock_metric_text_s_change_log_pkey PRIMARY KEY (whence, sid, name); 
    2094  
    2095  
    2096 -- 
    2097 -- Name: loading_dock_metric_text_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2098 -- 
    2099  
    2100 ALTER TABLE ONLY loading_dock_metric_text_s 
    2101     ADD CONSTRAINT loading_dock_metric_text_s_pkey PRIMARY KEY (whence, sid, name); 
    2102  
    2103  
    2104 -- 
    2105 -- Name: loading_dock_status_s_change_log_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2106 -- 
    2107  
    2108 ALTER TABLE ONLY loading_dock_status_s_change_log 
    2109     ADD CONSTRAINT loading_dock_status_s_change_log_pkey PRIMARY KEY (sid, whence); 
    2110  
    2111  
    2112 -- 
    2113 -- Name: loading_dock_status_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2114 -- 
    2115  
    2116 ALTER TABLE ONLY loading_dock_status_s 
    2117     ADD CONSTRAINT loading_dock_status_s_pkey PRIMARY KEY (sid, whence); 
    2118  
    2119  
    2120 -- 
    2121 -- Name: log_whence_s_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2122 -- 
    2123  
    2124 ALTER TABLE ONLY log_whence_s 
    2125     ADD CONSTRAINT log_whence_s_pkey PRIMARY KEY (whence, "interval"); 
    2126  
    2127  
    2128 -- 
    2129 -- Name: map_uuid_to_sid_pkey; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2130 -- 
    2131  
    2132 ALTER TABLE ONLY map_uuid_to_sid 
    2133     ADD CONSTRAINT map_uuid_to_sid_pkey PRIMARY KEY (id, sid); 
    2134  
    2135  
    2136 -- 
    2137 -- Name: metric_name_summary_pk; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    2138 -- 
    2139  
    2140 ALTER TABLE ONLY metric_name_summary 
    2141     ADD CONSTRAINT metric_name_summary_pk UNIQUE (sid, metric_name, metric_type); 
    21422143 
    21432144 
     
    22472248 
    22482249 
    2249 -- 
    2250 -- Name: trig_update_tsvector_from_metric_tags; Type: TRIGGER; Schema: prism; Owner: reconnoiter 
     2250SET search_path = stratcon, pg_catalog; 
     2251 
     2252-- 
     2253-- Name: loading_dock_metric_numeric_s_whence_log; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
     2254-- 
     2255 
     2256CREATE TRIGGER loading_dock_metric_numeric_s_whence_log 
     2257    AFTER INSERT ON loading_dock_metric_numeric_s 
     2258    FOR EACH ROW 
     2259    EXECUTE PROCEDURE loading_dock_metric_numeric_s_whence_log(); 
     2260 
     2261 
     2262-- 
     2263-- Name: loading_dock_metric_text_s_change_log; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
     2264-- 
     2265 
     2266CREATE TRIGGER loading_dock_metric_text_s_change_log 
     2267    AFTER INSERT ON loading_dock_metric_text_s 
     2268    FOR EACH ROW 
     2269    EXECUTE PROCEDURE loading_dock_metric_text_s_change_log(); 
     2270 
     2271 
     2272-- 
     2273-- Name: loading_dock_status_s_change_log; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
     2274-- 
     2275 
     2276CREATE TRIGGER loading_dock_status_s_change_log 
     2277    AFTER INSERT ON loading_dock_status_s 
     2278    FOR EACH ROW 
     2279    EXECUTE PROCEDURE loading_dock_status_s_change_log(); 
     2280 
     2281 
     2282-- 
     2283-- Name: mv_loading_dock_check_s; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
     2284-- 
     2285 
     2286CREATE TRIGGER mv_loading_dock_check_s 
     2287    AFTER INSERT ON loading_dock_check_s 
     2288    FOR EACH ROW 
     2289    EXECUTE PROCEDURE mv_loading_dock_check_s(); 
     2290 
     2291 
     2292-- 
     2293-- Name: trig_update_tsvector_from_metric_summary; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
     2294-- 
     2295 
     2296CREATE TRIGGER trig_update_tsvector_from_metric_summary 
     2297    AFTER INSERT OR UPDATE ON metric_name_summary 
     2298    FOR EACH ROW 
     2299    EXECUTE PROCEDURE trig_update_tsvector_from_metric_summary(); 
     2300 
     2301 
     2302-- 
     2303-- Name: trig_update_tsvector_from_metric_tags; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
    22512304-- 
    22522305 
     
    22572310 
    22582311 
    2259 SET search_path = stratcon, pg_catalog; 
    2260  
    2261 -- 
    2262 -- Name: loading_dock_metric_numeric_s_whence_log; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
    2263 -- 
    2264  
    2265 CREATE TRIGGER loading_dock_metric_numeric_s_whence_log 
    2266     AFTER INSERT ON loading_dock_metric_numeric_s 
    2267     FOR EACH ROW 
    2268     EXECUTE PROCEDURE loading_dock_metric_numeric_s_whence_log(); 
    2269  
    2270  
    2271 -- 
    2272 -- Name: loading_dock_metric_text_s_change_log; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
    2273 -- 
    2274  
    2275 CREATE TRIGGER loading_dock_metric_text_s_change_log 
    2276     AFTER INSERT ON loading_dock_metric_text_s 
    2277     FOR EACH ROW 
    2278     EXECUTE PROCEDURE loading_dock_metric_text_s_change_log(); 
    2279  
    2280  
    2281 -- 
    2282 -- Name: loading_dock_status_s_change_log; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
    2283 -- 
    2284  
    2285 CREATE TRIGGER loading_dock_status_s_change_log 
    2286     AFTER INSERT ON loading_dock_status_s 
    2287     FOR EACH ROW 
    2288     EXECUTE PROCEDURE loading_dock_status_s_change_log(); 
    2289  
    2290  
    2291 -- 
    2292 -- Name: mv_loading_dock_check_s; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
    2293 -- 
    2294  
    2295 CREATE TRIGGER mv_loading_dock_check_s 
    2296     AFTER INSERT ON loading_dock_check_s 
    2297     FOR EACH ROW 
    2298     EXECUTE PROCEDURE mv_loading_dock_check_s(); 
    2299  
    2300  
    2301 -- 
    2302 -- Name: trig_update_tsvector_from_metric_summary; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
    2303 -- 
    2304  
    2305 CREATE TRIGGER trig_update_tsvector_from_metric_summary 
    2306     AFTER INSERT OR UPDATE ON metric_name_summary 
    2307     FOR EACH ROW 
    2308     EXECUTE PROCEDURE trig_update_tsvector_from_metric_summary(); 
    2309  
    2310  
    23112312-- 
    23122313-- Name: trig_update_tsvector_from_mv_dock; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
     
    23552356GRANT ALL ON SCHEMA stratcon TO stratcon; 
    23562357GRANT USAGE ON SCHEMA stratcon TO prism; 
    2357  
    2358  
    2359 -- 
    2360 -- Name: metric_tags; Type: ACL; Schema: prism; Owner: reconnoiter 
    2361 -- 
    2362  
    2363 REVOKE ALL ON TABLE metric_tags FROM PUBLIC; 
    2364 REVOKE ALL ON TABLE metric_tags FROM reconnoiter; 
    2365 GRANT ALL ON TABLE metric_tags TO reconnoiter; 
    2366 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_tags TO prism; 
    23672358 
    23682359 
     
    25222513 
    25232514-- 
     2515-- Name: metric_tags; Type: ACL; Schema: stratcon; Owner: reconnoiter 
     2516-- 
     2517 
     2518REVOKE ALL ON TABLE metric_tags FROM PUBLIC; 
     2519REVOKE ALL ON TABLE metric_tags FROM reconnoiter; 
     2520GRANT ALL ON TABLE metric_tags TO reconnoiter; 
     2521GRANT ALL ON TABLE metric_tags TO prism; 
     2522 
     2523 
     2524-- 
    25242525-- Name: mv_loading_dock_check_s; Type: ACL; Schema: stratcon; Owner: reconnoiter 
    25252526--