Index: openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql	5 Mar 2003 17:17:33 -0000	1.6
+++ openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql	28 Aug 2003 09:41:59 -0000	1.7
@@ -22,15 +22,15 @@
              from workflow_cases
              where workflow_id = delete_workflow_id loop
 
-        perform workflow_case__delete (rec.case_id);
+        perform workflow_case_pkg__delete (rec.case_id);
   end loop;
 
   perform acs_object__delete(delete_workflow_id);
 
   return 0; 
 end;' language 'plpgsql';
 
-create or replace function workflow_case__delete (integer)
+create or replace function workflow_case_pkg__delete (integer)
 returns integer as '
 declare
   delete_case_id                alias for $1;
@@ -48,7 +48,7 @@
 
     -- All workflow data cascades from the case id
     delete from workflow_cases
-      where object_id = delete_case_id;    
+      where case_id = delete_case_id;    
 
   return 0; 
 end;' language 'plpgsql';
@@ -101,7 +101,7 @@
 
 
 -- Function for getting the pretty state of a case
-create or replace function workflow_case__get_pretty_state (
+create or replace function workflow_case_pkg__get_pretty_state (
     varchar, -- workflow_short_name
     integer  -- object_id
 )
