root/sql/tables/noit.metric_tag.sql

Revision 4bd7d843175692be84818c389d9938e7590cd487, 1.7 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 years ago)

make it load

  • Property mode set to 100644
Line 
1 -- formerly metric_tags
2 --
3 -- PostgreSQL database dump
4 --
5
6 SET client_encoding = 'UTF8';
7 SET standard_conforming_strings = off;
8 SET check_function_bodies = false;
9 SET client_min_messages = warning;
10 SET escape_string_warning = off;
11
12 SET search_path = noit, pg_catalog;
13
14 SET default_tablespace = '';
15
16 SET default_with_oids = false;
17
18 --
19 -- Name: metric_tag; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:
20 --
21
22 CREATE TABLE metric_tag (
23     sid integer NOT NULL,
24     metric_name text NOT NULL,
25     tags_array text[]
26 );
27
28
29 ALTER TABLE noit.metric_tag OWNER TO reconnoiter;
30
31 --
32 -- Name: metric_tag_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:
33 --
34
35 ALTER TABLE ONLY metric_tag
36     ADD CONSTRAINT metric_tag_pkey PRIMARY KEY (sid, metric_name);
37
38
39 --
40 -- Name: trig_update_tsvector_from_metric_tag; Type: TRIGGER; Schema: noit; Owner: reconnoiter
41 --
42
43 CREATE TRIGGER update_metric_name_summary
44     AFTER INSERT OR UPDATE ON metric_tag
45     FOR EACH ROW
46     EXECUTE PROCEDURE update_mns_via_metric_tag();
47
48
49 --
50 -- Name: metric_tag_sid_fkey; Type: FK CONSTRAINT; Schema: noit; Owner: reconnoiter
51 -- NOTE: this FK reference is only valid on single database installations
52 --
53
54 ALTER TABLE ONLY metric_tag
55     ADD CONSTRAINT metric_tag_sid_fkey FOREIGN KEY (sid) REFERENCES stratcon.map_uuid_to_sid(sid);
56
57
58 --
59 -- Name: metric_tag; Type: ACL; Schema: noit; Owner: reconnoiter
60 --
61
62 REVOKE ALL ON TABLE metric_tag FROM PUBLIC;
63 REVOKE ALL ON TABLE metric_tag FROM reconnoiter;
64 GRANT ALL ON TABLE metric_tag TO reconnoiter;
65 GRANT ALL ON TABLE metric_tag TO prism;
66 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_tag TO stratcon;
67
68
69 --
70 -- PostgreSQL database dump complete
71 --
72
Note: See TracBrowser for help on using the browser.