root/sql/tables/noit.metric_numeric_rollup_6hours.sql

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

adding schema for rollup tables, with array based storage

  • Property mode set to 100644
Line 
1 -- formerly rollup_matrix_numeric_6hours
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_numeric_rollup_6hours; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:
20 --
21
22 CREATE TABLE metric_numeric_rollup_6hours (
23     sid integer NOT NULL,
24     name text NOT NULL,
25     rollup_time timestamp with time zone NOT NULL,
26     count_rows integer[],
27     avg_value numeric[],
28     counter_dev numeric[],
29     CONSTRAINT metric_numeric_rollup_6hours_rollup_time_check CHECK (((date_part('hour'::text, timezone('UTC'::text, rollup_time)) = ANY (ARRAY[(0)::double precision, (6)::double precision, (12)::double precision, (18)::double precision])) AND (date_part('minute'::text, timezone('utc'::text, rollup_time)) = (0)::double precision)))
30 );
31
32
33 ALTER TABLE noit.metric_numeric_rollup_6hours OWNER TO reconnoiter;
34
35 --
36 -- Name: metric_numeric_rollup_6hours_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:
37 --
38
39 ALTER TABLE ONLY metric_numeric_rollup_6hours
40     ADD CONSTRAINT metric_numeric_rollup_6hours_pkey PRIMARY KEY (rollup_time, sid, name);
41
42 --
43 -- Name: metric_numeric_rollup_6hours; Type: ACL; Schema: noit; Owner: reconnoiter
44 --
45
46 REVOKE ALL ON TABLE metric_numeric_rollup_6hours FROM PUBLIC;
47 REVOKE ALL ON TABLE metric_numeric_rollup_6hours FROM reconnoiter;
48 GRANT ALL ON TABLE metric_numeric_rollup_6hours TO reconnoiter;
49 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_numeric_rollup_6hours TO stratcon;
50 GRANT SELECT ON TABLE metric_numeric_rollup_6hours TO prism;
51
52
53 --
54 -- PostgreSQL database dump complete
55 --
56
Note: See TracBrowser for help on using the browser.