root/sql/tables/noit.metric_name_summary.sql

Revision 3e3863d0f5b6548f78558042bd6c87f71145a732, 1.8 kB (checked in by Robert Treat <robert@omniti.com>, 5 years ago)

metric name summary

  • Property mode set to 100644
Line 
1 -- formerly metric_name_summary (the same!)
2
3 --
4 -- PostgreSQL database dump
5 --
6
7 SET client_encoding = 'UTF8';
8 SET standard_conforming_strings = off;
9 SET check_function_bodies = false;
10 SET client_min_messages = warning;
11 SET escape_string_warning = off;
12
13 SET search_path = noit, pg_catalog;
14
15 SET default_tablespace = '';
16
17 SET default_with_oids = false;
18
19 --
20 -- Name: metric_name_summary; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:
21 --
22
23 CREATE TABLE metric_name_summary (
24     sid integer NOT NULL,
25     metric_name text NOT NULL,
26     metric_type text,
27     active boolean DEFAULT true,
28     fts_data tsvector
29 );
30
31
32 ALTER TABLE noit.metric_name_summary OWNER TO reconnoiter;
33
34 --
35 -- Name: metric_name_summary_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:
36 --
37
38 ALTER TABLE ONLY metric_name_summary
39     ADD CONSTRAINT metric_name_summary_pkey UNIQUE (sid, metric_name, metric_type);
40
41
42 --
43 -- Name: metric_name_summary_fts_data_idx; Type: INDEX; Schema: noit; Owner: reconnoiter; Tablespace:
44 --
45
46 CREATE INDEX metric_name_summary_fts_data_idx ON metric_name_summary USING gin (ts_search_all);
47
48
49 --
50 -- Name: trig_update_tsvector_from_metric_summary; Type: TRIGGER; Schema: noit; Owner: reconnoiter
51 --
52
53 CREATE TRIGGER update_metric_name_summary
54     BEFORE INSERT OR UPDATE ON metric_name_summary
55     FOR EACH ROW
56     EXECUTE PROCEDURE update_mns_via_self();
57
58
59 --
60 -- Name: metric_name_summary; Type: ACL; Schema: noit; Owner: reconnoiter
61 --
62
63 REVOKE ALL ON TABLE metric_name_summary FROM PUBLIC;
64 REVOKE ALL ON TABLE metric_name_summary FROM reconnoiter;
65 GRANT ALL ON TABLE metric_name_summary TO reconnoiter;
66 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_name_summary TO stratcon;
67 GRANT SELECT,UPDATE ON TABLE metric_name_summary TO prism;
68
69
70 --
71 -- PostgreSQL database dump complete
72 --
73
Note: See TracBrowser for help on using the browser.