Changeset dfd06d8bc70524168b54bb26477b5f0a3f3a38fe

Show
Ignore:
Timestamp:
10/20/09 15:34:46 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1256052886 +0000
git-parent:

[bcfd3007c0f115d339be6889e5a1fc27333d0b43]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1256052886 +0000
Message:

fix up things to work

Files:

Legend:

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

    rfe61445 rdfd06d8  
    44alter user stratcon set search_path to noit,public; 
    55create user prism with unencrypted password 'prism'; 
     6alter user prism set search_path to noit,public; 
    67\c reconnoiter reconnoiter; 
    78begin; 
     
    3435\i tables/stratcon.storage_node.sql 
    3536\i tables/stratcon.map_uuid_to_sid.sql 
     37\i tables/prism.graph_templates.sql 
    3638 
    3739\i sprocs/noit.check_archive_log_changes.sql 
     
    5254\i sprocs/stratcon.window_robust_derive.sql 
    5355\i sprocs/stratcon.update_config.sql 
     56\i sprocs/prism.add_graph_tags.sql 
     57\i sprocs/prism.add_tags.sql 
     58\i sprocs/prism.check_name_saved_graphs.sql 
     59\i sprocs/prism.remove_graph_tags.sql 
     60\i sprocs/prism.remove_tags.sql 
     61\i sprocs/prism.saved_graphs_tsvector.sql 
     62\i sprocs/prism.trig_update_tsvector_saved_graphs.sql 
    5463 
    5564\i tables/noit.check_archive.sql 
     
    6170\i tables/noit.metric_tag.sql 
    6271\i tables/noit.metric_text_archive.sql 
     72\i tables/prism.saved_graphs.sql 
     73\i tables/prism.saved_graphs_dep.sql 
     74\i tables/prism.saved_worksheets.sql 
     75\i tables/prism.saved_worksheets_dep.sql 
    6376 
    6477commit; 
  • sql/sprocs/stratcon.choose_window.sql

    r161a5c5 rdfd06d8  
    1919                 ) i, 
    2020                 (   select 5*60 as isec, '5 minutes'::interval as aperiod, 
    21                             'noit.metric_numeric_rollup_5m' as atablename 
     21                            'metric_numeric_rollup_5m' as atablename 
    2222                  union all 
    2323                     select 20*60 as isec, '20 minutes'::interval as aperiod, 
    24                             'noit.metric_numeric_rollup_20m' as atablename 
     24                            'metric_numeric_rollup_20m' as atablename 
    2525                  union all 
    2626                     select 60*60 as isec, '1 hour'::interval as aperiod, 
    27                             'noit.metric_numeric_rollup_60m' as atablename 
     27                            'metric_numeric_rollup_60m' as atablename 
    2828                  union all 
    2929                     select 6*60*60 as isec, '6 hours'::interval as aaperiod, 
    30                             'noit.metric_numeric_rollup_6hours' as atablename 
     30                            'metric_numeric_rollup_6hours' as atablename 
    3131                  union all 
    3232                     select 12*60*60 as isec, '12 hours'::interval as aperiod, 
    33                             'noit.metric_numeric_rollup_12hours' as atablename 
     33                            'metric_numeric_rollup_12hours' as atablename 
    3434                 ) ivs 
    3535         ) b 
  • sql/sprocs/stratcon.fetch_dataset.sql

    r161a5c5 rdfd06d8  
    1212  end if; 
    1313 
    14     for v_record in  select sid, name, rollup_time, count_rows, avg_value, counter_dev from stratcon._fetch_dataset(v_sid::integer, in_name, in_start_time, in_end_time, in_hopeful_nperiods, derive) loop 
     14    for v_record in  select sid, name, rollup_time, count_rows, avg_value, counter_dev from stratcon.fetch_dataset(v_sid::integer, in_name, in_start_time, in_end_time, in_hopeful_nperiods, derive) loop 
    1515    return next v_record;  
    1616    end loop; 
    1717 
    18 --  return query select sid, name, rollup_time, count_rows, avg_value from stratcon._fetch_dataset(v_sid::integer, in_name, in_start_time, in_end_time, in_hopeful_nperiods, derive); 
     18--  return query select sid, name, rollup_time, count_rows, avg_value from stratcon.fetch_dataset(v_sid::integer, in_name, in_start_time, in_end_time, in_hopeful_nperiods, derive); 
    1919  return; 
    2020end 
     
    2424GRANT EXECUTE ON FUNCTION stratcon.fetch_dataset(uuid, text, timestamp with time zone, timestamp with time zone, integer, boolean) TO stratcon; 
    2525 
    26 CREATE OR REPLACE FUNCTION stratcon._fetch_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) 
     26CREATE OR REPLACE FUNCTION stratcon.fetch_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) 
    2727  RETURNS SETOF noit.metric_numeric_rollup_5m AS 
    2828$BODY$declare 
     
    6868             ' from generate_series(1,' || v_target.nperiods || ') t) s ' || 
    6969           'left join ' || 
    70            '(select * from noit.' || v_target.tablename || 
     70           '(select * from ' || v_target.tablename || 
    7171           ' where sid = ' || v_sid || 
    7272             ' and name = ' || quote_literal(in_name) || 
     
    9999$BODY$ 
    100100  LANGUAGE 'plpgsql' SECURITY DEFINER; 
    101 GRANT EXECUTE ON FUNCTION  stratcon._fetch_dataset(integer, text, timestamp with time zone, timestamp with time zone, integer, boolean) TO stratcon; 
     101GRANT EXECUTE ON FUNCTION  stratcon.fetch_dataset(integer, text, timestamp with time zone, timestamp with time zone, integer, boolean) TO stratcon; 
    102102  
  • sql/sprocs/stratcon.fetch_varset.sql

    rb9af758 rdfd06d8  
    5656           extract('epoch' from v_target.period)) || ' seconds') ::interval as whence, 
    5757           name, value 
    58       from noit.metric_text_changelog 
     58      from metric_text_changelog 
    5959     where sid = v_sid 
    6060       and name = in_name 
     
    7979           extract('epoch' from v_target.period)) || ' seconds') ::interval as whence, 
    8080           coalesce(value, '[unset]') as value 
    81       from noit.metric_text_changelog  
     81      from metric_text_changelog  
    8282     where sid = v_sid 
    8383       and name = in_name 
  • sql/sprocs/stratcon.window_robust_derive.sql

    refff2d9 rdfd06d8  
    2323                   (whence > in_start_time - '5 minutes'::interval) as in_window, 
    2424                   value 
    25               FROM noit.metric_numeric_archive 
     25              FROM metric_numeric_archive 
    2626             WHERE whence <= in_start_time 
    2727               AND whence > in_start_time - ('5 minutes'::interval * 2)