Changeset c3a1f2e12de43c398369bb5a3f902eebde93f9bb

Show
Ignore:
Timestamp:
03/26/09 21:58:11 (5 years ago)
Author:
Denish Patel <denish@omniti.com>
git-committer:
Denish Patel <denish@omniti.com> 1238104691 +0000
git-parent:

[e3e35fcfbb73d6001f7b6dca7ff7311e1148ccfb]

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

checking in postgres ddl dump

Files:

Legend:

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

    re3e35fc rc3a1f2e  
    1010 
    1111-- 
     12-- Name: iep; Type: SCHEMA; Schema: -; Owner: iepuser 
     13-- 
     14 
     15CREATE SCHEMA iep; 
     16 
     17 
     18ALTER SCHEMA iep OWNER TO iepuser; 
     19 
     20-- 
     21-- Name: otools; Type: SCHEMA; Schema: -; Owner: postgres 
     22-- 
     23 
     24CREATE SCHEMA otools; 
     25 
     26 
     27ALTER SCHEMA otools OWNER TO postgres; 
     28 
     29-- 
    1230-- Name: prism; Type: SCHEMA; Schema: -; Owner: prism 
    1331-- 
     
    3654ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO omniti; 
    3755 
     56SET search_path = iep, pg_catalog; 
     57 
     58SET default_tablespace = ''; 
     59 
     60SET default_with_oids = false; 
     61 
     62-- 
     63-- Name: results; Type: TABLE; Schema: iep; Owner: iepuser; Tablespace:  
     64-- 
     65 
     66CREATE TABLE results ( 
     67    uuid character varying NOT NULL, 
     68    value double precision NOT NULL, 
     69    start character varying, 
     70    name character varying NOT NULL, 
     71    type character varying, 
     72    "time" character varying NOT NULL 
     73); 
     74 
     75 
     76ALTER TABLE iep.results OWNER TO iepuser; 
     77 
     78SET search_path = otools, pg_catalog; 
     79 
     80-- 
     81-- Name: table_growth; Type: TABLE; Schema: otools; Owner: postgres; Tablespace:  
     82-- 
     83 
     84CREATE TABLE table_growth ( 
     85    table_owner text NOT NULL, 
     86    schema_name text NOT NULL, 
     87    table_name text NOT NULL, 
     88    actual_size numeric NOT NULL, 
     89    growth_size numeric NOT NULL, 
     90    sum_flag smallint NOT NULL, 
     91    capture_time date NOT NULL 
     92); 
     93 
     94 
     95ALTER TABLE otools.table_growth OWNER TO postgres; 
     96 
    3897SET search_path = prism, pg_catalog; 
    39  
    40 SET default_tablespace = ''; 
    41  
    42 SET default_with_oids = false; 
    4398 
    4499-- 
     
    128183ALTER TABLE public.foo OWNER TO omniti; 
    129184 
     185-- 
     186-- Name: gah; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
     187-- 
     188 
     189CREATE TABLE gah ( 
     190    sid integer, 
     191    name text, 
     192    rollup_time timestamp with time zone, 
     193    count_rows integer, 
     194    avg_value numeric, 
     195    counter_dev numeric 
     196); 
     197 
     198 
     199ALTER TABLE public.gah OWNER TO postgres; 
     200 
     201-- 
     202-- Name: meh; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
     203-- 
     204 
     205CREATE TABLE meh ( 
     206    sid integer NOT NULL, 
     207    name text NOT NULL, 
     208    rollup_time timestamp with time zone NOT NULL, 
     209    count_rows integer, 
     210    avg_value numeric, 
     211    counter_dev numeric, 
     212    CONSTRAINT meh_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))) 
     213); 
     214 
     215 
     216ALTER TABLE public.meh OWNER TO postgres; 
     217 
    130218SET default_with_oids = true; 
    131219 
     
    268356ALTER TABLE public.varnish_huh2 OWNER TO reconnoiter; 
    269357 
     358-- 
     359-- Name: x; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
     360-- 
     361 
     362CREATE TABLE x ( 
     363    sid integer, 
     364    whence timestamp with time zone, 
     365    name text, 
     366    value numeric 
     367); 
     368 
     369 
     370ALTER TABLE public.x OWNER TO postgres; 
     371 
    270372SET search_path = stratcon, pg_catalog; 
    271373 
     
    344446 
    345447-- 
     448-- Name: loading_dock_metric_numeric_s_old; Type: TABLE; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     449-- 
     450 
     451CREATE TABLE loading_dock_metric_numeric_s_old ( 
     452    sid integer NOT NULL, 
     453    whence timestamp with time zone NOT NULL, 
     454    name text NOT NULL, 
     455    value numeric 
     456); 
     457 
     458 
     459ALTER TABLE stratcon.loading_dock_metric_numeric_s_old OWNER TO reconnoiter; 
     460 
     461-- 
    346462-- Name: loading_dock_metric_text_s; Type: TABLE; Schema: stratcon; Owner: reconnoiter; Tablespace:  
    347463-- 
     
    483599    count_rows integer, 
    484600    avg_value numeric, 
    485     counter_dev numeric 
     601    counter_dev numeric, 
     602    CONSTRAINT rollup_matrix_numeric_12hours_rollup_time_check CHECK (((date_part('hour'::text, timezone('UTC'::text, rollup_time)) = ANY (ARRAY[(0)::double precision, (12)::double precision])) AND (date_part('minute'::text, timezone('utc'::text, rollup_time)) = (0)::double precision))) 
    486603); 
    487604 
     
    547664    count_rows integer, 
    548665    avg_value numeric, 
    549     counter_dev numeric 
     666    counter_dev numeric, 
     667    CONSTRAINT rollup_matrix_numeric_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))) 
    550668); 
    551669 
     
    564682 
    565683ALTER TABLE stratcon.rollup_runner OWNER TO reconnoiter; 
     684 
     685-- 
     686-- Name: test6; Type: TABLE; Schema: stratcon; Owner: postgres; Tablespace:  
     687-- 
     688 
     689CREATE TABLE test6 ( 
     690    rollup_time timestamp without time zone, 
     691    duration character varying(10) 
     692); 
     693 
     694 
     695ALTER TABLE stratcon.test6 OWNER TO postgres; 
     696 
     697SET search_path = otools, pg_catalog; 
     698 
     699-- 
     700-- Name: collect_table_growth(); Type: FUNCTION; Schema: otools; Owner: postgres 
     701-- 
     702 
     703CREATE FUNCTION collect_table_growth() RETURNS void 
     704    AS $$ 
     705    insert into otools.table_growth (table_owner, schema_name, table_name, actual_size, growth_size, sum_flag, capture_time)  
     706    select pg_get_userbyid(c.relowner) AS table_owner, n.nspname AS schema_name, c.relname AS table_name, pg_total_relation_size(c.oid), 0, 0, current_date  
     707    from pg_class c JOIN pg_namespace n ON (c.relnamespace=n.oid) where relkind = 'r' and reltuples > 10000; 
     708$$ 
     709    LANGUAGE sql; 
     710 
     711 
     712ALTER FUNCTION otools.collect_table_growth() OWNER TO postgres; 
     713 
     714-- 
     715-- Name: quote_nullable(numeric); Type: FUNCTION; Schema: otools; Owner: postgres 
     716-- 
     717 
     718CREATE FUNCTION quote_nullable(numeric) RETURNS text 
     719    AS $_$ 
     720SELECT CASE WHEN $1 IS NULL THEN 'NULL' ELSE $1::text END; 
     721$_$ 
     722    LANGUAGE sql; 
     723 
     724 
     725ALTER FUNCTION otools.quote_nullable(numeric) OWNER TO postgres; 
     726 
     727-- 
     728-- Name: quote_nullable(text); Type: FUNCTION; Schema: otools; Owner: postgres 
     729-- 
     730 
     731CREATE FUNCTION quote_nullable(text) RETURNS text 
     732    AS $_$ 
     733SELECT CASE WHEN $1 IS NULL THEN 'NULL' ELSE quote_literal($1) END; 
     734$_$ 
     735    LANGUAGE sql; 
     736 
     737 
     738ALTER FUNCTION otools.quote_nullable(text) OWNER TO postgres; 
     739 
     740-- 
     741-- Name: quote_nullable(timestamp with time zone); Type: FUNCTION; Schema: otools; Owner: postgres 
     742-- 
     743 
     744CREATE FUNCTION quote_nullable(timestamp with time zone) RETURNS text 
     745    AS $_$ 
     746SELECT CASE WHEN $1 IS NULL THEN 'NULL' ELSE quote_literal($1) END; 
     747$_$ 
     748    LANGUAGE sql; 
     749 
     750 
     751ALTER FUNCTION otools.quote_nullable(timestamp with time zone) OWNER TO postgres; 
     752 
     753-- 
     754-- Name: summarize_table_growth(); Type: FUNCTION; Schema: otools; Owner: postgres 
     755-- 
     756 
     757CREATE FUNCTION summarize_table_growth() RETURNS void 
     758    AS $$ 
     759declare 
     760    v_sql text; 
     761begin 
     762 
     763-- Daily summarization 
     764IF to_char(current_date,'dd') <> '01' THEN 
     765    insert into otools.table_growth (table_owner, schema_name, table_name, actual_size, growth_size, sum_flag, capture_time) 
     766    select a.table_owner, a.schema_name, a.table_name, a.actual_size, a.actual_size-coalesce(b.actual_size,0) AS table_growth, 1, a.capture_time 
     767    from otools.table_growth a  
     768        left join otools.table_growth b  
     769            on (a.table_owner=b.table_owner and a.table_name=b.table_name and a.schema_name=b.schema_name and b.capture_time = current_date -1)  
     770    where  
     771        a.sum_flag=0 and a.capture_time = current_date; 
     772    -- now remove older rows 
     773    delete from otools.table_growth where sum_flag = 0; 
     774END IF; 
     775 
     776-- Monthly summarization 
     777IF to_char(current_date,'dd') = '01' THEN 
     778    insert into otools.table_growth (table_owner, schema_name, table_name, actual_size, growth_size, sum_flag, capture_time) 
     779    select a.table_owner, a.schema_name, a.table_name, max(actual_size), sum(growth_size), 2, (current_date - '1 month'::interval)  
     780    from otools.table_growth a  
     781    where sum_flag=1 and capture_time between (current_date - '1 month'::interval) and current_date  
     782    group by table_owner, schema_name, table_name; 
     783    -- now remove older rows 
     784    delete from otools.table_growth where sum_flag = 1; 
     785END IF; 
     786 
     787end  
     788$$ 
     789    LANGUAGE plpgsql; 
     790 
     791 
     792ALTER FUNCTION otools.summarize_table_growth() OWNER TO postgres; 
    566793 
    567794SET search_path = prism, pg_catalog; 
     
    9141141 
    9151142ALTER FUNCTION stratcon.date_hour(timestamp with time zone) OWNER TO reconnoiter; 
     1143 
     1144-- 
     1145-- Name: director_loading_dock_metric_numeric_s(); Type: FUNCTION; Schema: stratcon; Owner: postgres 
     1146-- 
     1147 
     1148CREATE FUNCTION director_loading_dock_metric_numeric_s() RETURNS trigger 
     1149    AS $$ 
     1150begin 
     1151return new; 
     1152end 
     1153$$ 
     1154    LANGUAGE plpgsql; 
     1155 
     1156 
     1157ALTER FUNCTION stratcon.director_loading_dock_metric_numeric_s() OWNER TO postgres; 
    9161158 
    9171159-- 
     
    19062148-- Insert Log for 6 Hour rollup 
    19072149    
    1908    SELECT whence FROM stratcon.log_whence_s WHERE whence=date_trunc('day', v_min_whence) + (floor(extract('hour' from v_min_whence)/6)*6) * '1 hour'::interval and interval='6 hours' 
     2150   SELECT whence FROM stratcon.log_whence_s WHERE whence=date_trunc('day', v_min_whence::timestamptz at time zone 'utc') + (floor(extract('hour' from v_min_whence::timestamptz at time zone 'utc')/6)*6) * '1 hour'::interval and interval='6 hours' 
    19092151           INTO v_whence; 
    19102152      IF NOT FOUND THEN 
    1911        INSERT INTO  stratcon.log_whence_s VALUES(date_trunc('day', v_min_whence) + (floor(extract('hour' from v_min_whence)/6)*6) * '1 hour'::interval,'6 hours'); 
     2153       INSERT INTO  stratcon.log_whence_s VALUES(date_trunc('day', v_min_whence::timestamptz at time zone 'utc') + (floor(extract('hour' from v_min_whence::timestamptz at time zone 'utc')/6)*6) * '1 hour'::interval,'6 hours'); 
    19122154   END IF; 
    19132155    
     
    20092251           INTO v_whence; 
    20102252      IF NOT FOUND THEN 
    2011        INSERT INTO  stratcon.log_whence_s VALUES(date_trunc('day', v_min_whence) + (floor(extract('hour' from v_min_whence)/12)*12) * '1 hour'::interval,'12 hours'); 
     2253       INSERT INTO  stratcon.log_whence_s VALUES(date_trunc('day', v_min_whence::timestamptz at time zone 'utc') + (floor(extract('hour' from v_min_whence::timestamptz at time zone 'utc')/12)*12) * '1 hour'::interval ,'12 hours'); 
    20122254   END IF; 
    20132255    
     
    20572299 
    20582300ALTER FUNCTION stratcon.rollup_matrix_numeric_6hours() OWNER TO reconnoiter; 
     2301 
     2302-- 
     2303-- Name: snapshot_maker(text, text); Type: FUNCTION; Schema: stratcon; Owner: postgres 
     2304-- 
     2305 
     2306CREATE FUNCTION snapshot_maker(v_parent text, v_pattern text) RETURNS void 
     2307    AS $_$ 
     2308DECLARE 
     2309    v_interval text; 
     2310    v_segment text; 
     2311    v_name text; 
     2312    v_match text; 
     2313 
     2314    v_checker_sql text; 
     2315BEGIN 
     2316    IF v_pattern = 'daily' then  
     2317        v_interval := '1 days';   
     2318        v_segment := 'day';   
     2319        v_name := 'YYYY_MMDD';  
     2320        v_match := '_p[0-9]{4}_[0-9]{4}$';     
     2321    ELSEIF v_pattern = 'weekly' then  
     2322        v_interval = '7 days';   
     2323        v_segment = 'week';   
     2324        v_name = 'YYYY_MMDD';  
     2325        v_match = '_p[0-9]{4}_[0-9]{4}$';    
     2326    ELSEIF v_pattern = 'monthly' then  
     2327        v_interval = '1 month';  
     2328        v_segment = 'month'; 
     2329        v_name = 'YYYY_MM'; 
     2330        v_match = '_p[0-9]{4}_[0-9]{2}$';  
     2331    END IF;  
     2332 
     2333    v_checker_sql := 'SELECT * FROM  
     2334        (SELECT '|| quote_literal(v_parent) || ' ||''_p''|| to_char( date_trunc('||quote_literal(v_segment)||', now() + (n * '||quote_literal(v_interval)||'::interval)), '||quote_literal(v_name)||') as part, 
     2335                date_trunc('||quote_literal(v_segment)||', now() + (n * '||quote_literal(v_interval)||'::interval)) ::timestamp without time zone as lower_bound, 
     2336                date_trunc('||quote_literal(v_segment)||', now() + ((n+1) * '||quote_literal(v_interval)||'::interval)) ::timestamp without time zone as upper_bound 
     2337           FROM generate_series(-3,3) n) a 
     2338        WHERE part not in (SELECT tablename from pg_tables WHERE tablename ~ ''^'||v_parent||v_match||''')'; 
     2339 
     2340    RAISE NOTICE '%', v_checker_sql; 
     2341 
     2342END 
     2343$_$ 
     2344    LANGUAGE plpgsql; 
     2345 
     2346 
     2347ALTER FUNCTION stratcon.snapshot_maker(v_parent text, v_pattern text) OWNER TO postgres; 
     2348 
     2349-- 
     2350-- Name: test_dataset(integer, text, timestamp with time zone, timestamp with time zone, integer, boolean); Type: FUNCTION; Schema: stratcon; Owner: omnidba 
     2351-- 
     2352 
     2353CREATE FUNCTION test_dataset(in_sid integer, in_name text, in_start_time timestamp with time zone, in_end_time timestamp with time zone, in_hopeful_nperiods integer, derive boolean) RETURNS SETOF rollup_matrix_numeric_5m 
     2354    AS $$declare 
     2355  v_sql text; 
     2356  v_sid int; 
     2357  v_target record; 
     2358  v_interval numeric; 
     2359  v_start_adj timestamptz; 
     2360  v_end_adj timestamptz; 
     2361  v_l_rollup_row stratcon.rollup_matrix_numeric_5m%rowtype; 
     2362  v_rollup_row stratcon.rollup_matrix_numeric_5m%rowtype; 
     2363  v_r_rollup_row stratcon.rollup_matrix_numeric_5m%rowtype; 
     2364begin 
     2365 
     2366  -- Map out uuid to an sid. 
     2367  v_sid := in_sid; 
     2368 
     2369  select * into v_target from stratcon.choose_window(in_start_time, in_end_time, in_hopeful_nperiods); 
     2370 
     2371  if not found then 
     2372    raise exception 'no target table'; 
     2373    return; 
     2374  end if; 
     2375 
     2376  select 'epoch'::timestamp + 
     2377         ((floor(extract('epoch' from in_start_time) / 
     2378                 extract('epoch' from v_target.period)) * 
     2379           extract('epoch' from v_target.period)) || ' seconds') ::interval 
     2380    into v_start_adj; 
     2381 
     2382 RAISE NOTICE 'start_adj: %',v_start_adj; 
     2383  
     2384  select 'epoch'::timestamp + 
     2385         ((floor(extract('epoch' from in_end_time) / 
     2386                 extract('epoch' from v_target.period)) * 
     2387           extract('epoch' from v_target.period)) || ' seconds') ::interval 
     2388    into v_end_adj; 
     2389 
     2390RAISE NOTICE 'end_adj: %',v_end_adj; 
     2391 
     2392  v_sql := 'select ' || v_sid || ' as sid, ' || quote_literal(in_name) || ' as name, ' || 
     2393           's.rollup_time, d.count_rows, d.avg_value, d.counter_dev ' || 
     2394           ' from ' || 
     2395           '(select ' || quote_literal(v_start_adj) || '::timestamp' || 
     2396                  ' + t * ' || quote_literal(v_target.period) || '::interval' || 
     2397                       ' as rollup_time' || 
     2398             ' from generate_series(1,' || v_target.nperiods || ') t) s ' || 
     2399           'left join ' || 
     2400           '(select * from stratcon.' || v_target.tablename || 
     2401           ' where sid = ' || v_sid || 
     2402             ' and name = ' || quote_literal(in_name) || 
     2403             ' and rollup_time between ' || quote_literal(v_start_adj) || '::timestamp' || 
     2404                                 ' and ' || quote_literal(v_end_adj) || '::timestamp) d' || 
     2405           ' using(rollup_time)'; 
     2406 
     2407RAISE NOTICE 'v_sql: %',v_sql; 
     2408 
     2409  for v_rollup_row in execute v_sql loop 
     2410    if derive is true then 
     2411      v_r_rollup_row := v_rollup_row; 
     2412      if v_l_rollup_row.count_rows is not null and 
     2413         v_rollup_row.count_rows is not null then 
     2414        v_interval := extract('epoch' from v_rollup_row.rollup_time) - extract('epoch' from v_l_rollup_row.rollup_time); 
     2415        v_r_rollup_row.count_rows := (v_l_rollup_row.count_rows + v_rollup_row.count_rows) / 2; 
     2416        v_r_rollup_row.avg_value := 
     2417          (v_rollup_row.avg_value - v_l_rollup_row.avg_value) / v_interval; 
     2418      else 
     2419        v_r_rollup_row.count_rows = NULL; 
     2420        v_r_rollup_row.avg_value = NULL; 
     2421         
     2422      end if; 
     2423    else 
     2424      v_r_rollup_row := v_rollup_row; 
     2425    end if; 
     2426    return next v_r_rollup_row; 
     2427    v_l_rollup_row := v_rollup_row; 
     2428  end loop; 
     2429  return; 
     2430end 
     2431$$ 
     2432    LANGUAGE plpgsql; 
     2433 
     2434 
     2435ALTER FUNCTION stratcon.test_dataset(in_sid integer, in_name text, in_start_time timestamp with time zone, in_end_time timestamp with time zone, in_hopeful_nperiods integer, derive boolean) OWNER TO omnidba; 
    20592436 
    20602437-- 
     
    21642541ALTER TABLE stratcon.seq_sid OWNER TO reconnoiter; 
    21652542 
     2543SET search_path = iep, pg_catalog; 
     2544 
     2545-- 
     2546-- Name: pkeyresults; Type: CONSTRAINT; Schema: iep; Owner: iepuser; Tablespace:  
     2547-- 
     2548 
     2549ALTER TABLE ONLY results 
     2550    ADD CONSTRAINT pkeyresults PRIMARY KEY (uuid, "time", value, name); 
     2551 
     2552 
    21662553SET search_path = prism, pg_catalog; 
    21672554 
     
    23212708    ADD CONSTRAINT loading_dock_metric_numeric_s_pkey PRIMARY KEY (whence, sid, name); 
    23222709 
    2323 ALTER TABLE loading_dock_metric_numeric_s CLUSTER ON loading_dock_metric_numeric_s_pkey; 
     2710 
     2711-- 
     2712-- Name: loading_dock_metric_numeric_s_pkey_old; Type: CONSTRAINT; Schema: stratcon; Owner: reconnoiter; Tablespace:  
     2713-- 
     2714 
     2715ALTER TABLE ONLY loading_dock_metric_numeric_s_old 
     2716    ADD CONSTRAINT loading_dock_metric_numeric_s_pkey_old PRIMARY KEY (whence, sid, name); 
     2717 
     2718ALTER TABLE loading_dock_metric_numeric_s_old CLUSTER ON loading_dock_metric_numeric_s_pkey_old; 
    23242719 
    23252720 
     
    24532848 
    24542849CREATE INDEX idx_saved_graphs_ts_search_all ON saved_graphs USING btree (ts_search_all); 
     2850 
     2851 
     2852-- 
     2853-- Name: saved_graphs_dep_sid_name_type; Type: INDEX; Schema: prism; Owner: reconnoiter; Tablespace:  
     2854-- 
     2855 
     2856CREATE INDEX saved_graphs_dep_sid_name_type ON saved_graphs_dep USING btree (sid, metric_name, metric_type); 
    24552857 
    24562858 
     
    25282930 
    25292931CREATE TRIGGER loading_dock_metric_numeric_s_whence_log 
     2932    AFTER INSERT ON loading_dock_metric_numeric_s_old 
     2933    FOR EACH ROW 
     2934    EXECUTE PROCEDURE loading_dock_metric_numeric_s_whence_log(); 
     2935 
     2936 
     2937-- 
     2938-- Name: loading_dock_metric_numeric_s_whence_log; Type: TRIGGER; Schema: stratcon; Owner: reconnoiter 
     2939-- 
     2940 
     2941CREATE TRIGGER loading_dock_metric_numeric_s_whence_log 
    25302942    AFTER INSERT ON loading_dock_metric_numeric_s 
    25312943    FOR EACH ROW 
     
    26163028 
    26173029ALTER TABLE ONLY saved_worksheets_dep 
    2618     ADD CONSTRAINT saved_worksheets_dep_graphid_fkey FOREIGN KEY (graphid) REFERENCES saved_graphs(graphid)
     3030    ADD CONSTRAINT saved_worksheets_dep_graphid_fkey FOREIGN KEY (graphid) REFERENCES saved_graphs(graphid) ON DELETE CASCADE
    26193031 
    26203032 
     
    26253037ALTER TABLE ONLY saved_worksheets_dep 
    26263038    ADD CONSTRAINT saved_worksheets_dep_sheetid_fkey FOREIGN KEY (sheetid) REFERENCES saved_worksheets(sheetid); 
     3039 
     3040 
     3041-- 
     3042-- Name: prism; Type: ACL; Schema: -; Owner: prism 
     3043-- 
     3044 
     3045REVOKE ALL ON SCHEMA prism FROM PUBLIC; 
     3046REVOKE ALL ON SCHEMA prism FROM prism; 
     3047GRANT ALL ON SCHEMA prism TO prism; 
     3048GRANT ALL ON SCHEMA prism TO stratcon; 
    26273049 
    26283050 
     
    27553177 
    27563178-- 
     3179-- Name: loading_dock_metric_numeric_s_old; Type: ACL; Schema: stratcon; Owner: reconnoiter 
     3180-- 
     3181 
     3182REVOKE ALL ON TABLE loading_dock_metric_numeric_s_old FROM PUBLIC; 
     3183REVOKE ALL ON TABLE loading_dock_metric_numeric_s_old FROM reconnoiter; 
     3184GRANT ALL ON TABLE loading_dock_metric_numeric_s_old TO reconnoiter; 
     3185GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE loading_dock_metric_numeric_s_old TO stratcon; 
     3186GRANT SELECT ON TABLE loading_dock_metric_numeric_s_old TO prism; 
     3187 
     3188 
     3189-- 
    27573190-- Name: loading_dock_metric_text_s; Type: ACL; Schema: stratcon; Owner: reconnoiter 
    27583191--