rrs-commit: r16 - trunk

decibel at decibel.org decibel at decibel.org
Sat Jan 22 02:35:39 GMT 2005


Author: decibel
Date: Sat Jan 22 02:35:38 2005
New Revision: 16

Modified:
   trunk/rrs_functions.sql
Log:
v_min_end_time can't be NULL now

Modified: trunk/rrs_functions.sql
==============================================================================
--- trunk/rrs_functions.sql	(original)
+++ trunk/rrs_functions.sql	Sat Jan 22 02:35:38 2005
@@ -191,19 +191,16 @@
 
     -- Check on keep_buckets
     -- Find the last bucket created, and subtract keep buckets from it
-    -- No reason to run this if v_min_end_time is already null
-    IF v_min_end_time IS NOT NULL THEN
-        SELECT INTO v_min_end_time
-                min(    (SELECT max(end_time)
-                                        FROM rrs.bucket
-                                        WHERE rrs_id = p_rrs_id
-                                    ) - time_per_bucket * keep_buckets
-                                , v_min_end_time
-                            )
-            FROM rrs.rrs
-            WHERE rrs_id = p_rrs_id
-        ;
-    END IF;
+    SELECT INTO v_min_end_time
+            min(    (SELECT max(end_time)
+                                    FROM rrs.bucket
+                                    WHERE rrs_id = p_rrs_id
+                                ) - time_per_bucket * keep_buckets
+                            , v_min_end_time
+                        )
+        FROM rrs.rrs
+        WHERE rrs_id = p_rrs_id
+    ;
     
     /*
     SELECT debug.f(''update_rrs_buckets v_min_end_time for rrs_id %s keep_buckets = %s''


More information about the rrs-commit mailing list