OSSP CVS Repository

ossp - Check-in [3434]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3434
Date: 2003-Jun-08 17:08:54 (local)
2003-Jun-08 15:08:54 (UTC)
User:rse
Branch:
Comment: simplify syntax
Tickets:
Inspections:
Files:
ossp-pkg/as/as-db/bres/bres-history.sql      1.11 -> 1.12     2 inserted, 4 deleted

ossp-pkg/as/as-db/bres/bres-history.sql 1.11 -> 1.12

--- bres-history.sql     2003/06/08 15:07:47     1.11
+++ bres-history.sql     2003/06/08 15:08:54     1.12
@@ -452,8 +452,7 @@
             new.ac_hid := as_hs_make(new.ac_oid);
         END IF;
         RETURN new;
-    END IF;
-    IF TG_WHEN = ''BEFORE'' AND TG_OP = ''UPDATE'' THEN
+    ELSIF TG_WHEN = ''BEFORE'' AND TG_OP = ''UPDATE'' THEN
         --  clone old entry to allow old entry to be overwritten as it would be new entry
         INSERT INTO as_account VALUES (old.ac_oid, old.ac_name, old.ac_hid);
         --  give new entry a new history id if not explicity set by user
@@ -461,8 +460,7 @@
             new.ac_hid := as_hs_make(new.ac_oid);
         END IF;
         RETURN new;
-    END IF;
-    IF TG_WHEN = ''AFTER'' AND TG_OP = ''DELETE'' THEN
+    ELSIF TG_WHEN = ''AFTER'' AND TG_OP = ''DELETE'' THEN
         --  delete corresponding history entries
         PERFORM as_hs_delete(old.ac_oid, old.ac_hid); 
         RETURN old;

CVSTrac 2.0.1