rrs-commit: r66 - trunk

decibel at decibel.org decibel at decibel.org
Tue Apr 19 21:22:48 GMT 2005


Author: decibel
Date: Tue Apr 19 21:22:47 2005
New Revision: 66

Added:
   trunk/rrs_views.sql
      - copied unchanged from r64, release/rrs-0.4.1/rrs_views.sql
Modified:
   trunk/install.sh
   trunk/rrs.sql
   trunk/update.sh
Log:
Move views into a seperate file

Modified: trunk/install.sh
==============================================================================
--- trunk/install.sh	(original)
+++ trunk/install.sh	Tue Apr 19 21:22:47 2005
@@ -11,3 +11,4 @@
 psql -U $USER -f rrs.sql $DBNAME
 psql -U $USER -f util_functions.sql $DBNAME
 psql -U $USER -f rrs_functions.sql $DBNAME
+psql -U $USER -f rrs_views.sql $DBNAME

Modified: trunk/rrs.sql
==============================================================================
--- trunk/rrs.sql	(original)
+++ trunk/rrs.sql	Tue Apr 19 21:22:47 2005
@@ -89,26 +89,6 @@
 \.
 */
 
-CREATE OR REPLACE VIEW rrs.history_data_interval_run_time_v AS
-    SELECT h.*
-            , CASE WHEN run_time_sec > 0
-                THEN rrs.seconds_to_interval(
-                        rrs.interval_to_seconds(data_interval)
-                        * desired_run_time_sec
-                        / run_time_sec
-                    )
-                END AS next_data_interval
-        FROM
-            ( SELECT rrs.interval_to_seconds(
-                                rrs.setting_get('desired run time')::interval
-                        ) AS desired_run_time_sec
-            ) AS s
-            , ( SELECT start_time, end_time, data_interval
-                        , end_time - start_time AS run_time
-                        , rrs.interval_to_seconds( end_time - start_time ) AS run_time_sec
-                    FROM history_data_interval ) h
-;
-
 GRANT SELECT ON rrs TO PUBLIC;
 GRANT SELECT ON source TO PUBLIC;
 GRANT SELECT,UPDATE ON source_source_id_seq TO PUBLIC;

Modified: trunk/update.sh
==============================================================================
--- trunk/update.sh	(original)
+++ trunk/update.sh	Tue Apr 19 21:22:47 2005
@@ -11,3 +11,4 @@
 update/0.3-0.4/update.sh $USER $DBNAME
 psql -U $USER -f util_functions.sql $DBNAME
 psql -U $USER -f rrs_functions.sql $DBNAME
+psql -U $USER -f rrs_views.sql $DBNAME


More information about the rrs-commit mailing list