Project

General

Profile

« Previous | Next » 

Revision 10693

bugfix: schemas/vegbien.sql: sync_analytical_stem_to_view(): added re-creation of range_modeling_input view

View differences:

schemas/vegbien.sql
998 998
    analytical_plot_def text := NULL;
999 999
    analytical_specimen_def text := NULL;
1000 1000
    provider_count_view_def text := NULL;
1001
    range_modeling_input_def text := NULL;
1001 1002
BEGIN
1002 1003
    -- Save and drop dependent objects
1003 1004
    BEGIN
......
1024 1025
    EXCEPTION
1025 1026
        WHEN undefined_table THEN NULL;
1026 1027
    END;
1028
    BEGIN
1029
        range_modeling_input_def :=
1030
            'CREATE OR REPLACE VIEW range_modeling_input AS '
1031
            ||pg_get_viewdef('range_modeling_input');
1032
        DROP VIEW range_modeling_input;
1033
    EXCEPTION
1034
        WHEN undefined_table THEN NULL;
1035
    END;
1027 1036
    
1028 1037
    DROP TABLE IF EXISTS analytical_stem;
1029 1038
    CREATE TABLE analytical_stem AS SELECT * FROM analytical_stem_view LIMIT 0;
......
1054 1063
        GRANT SELECT ON TABLE provider_count_view TO bien_read;
1055 1064
        GRANT SELECT ON TABLE provider_count_view TO public_;
1056 1065
    END IF;
1066
    IF range_modeling_input_def IS NOT NULL THEN
1067
        EXECUTE range_modeling_input_def;
1068
        GRANT SELECT ON TABLE range_modeling_input TO bien_read;
1069
    END IF;
1057 1070
END;
1058 1071
$$;
1059 1072

  

Also available in: Unified diff