Index: openacs-4/packages/new-portal/sql/postgresql/api-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/sql/postgresql/api-create.sql,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/new-portal/sql/postgresql/api-create.sql	29 Jun 2004 10:18:37 -0000	1.12
+++ openacs-4/packages/new-portal/sql/postgresql/api-create.sql	24 Jul 2004 15:24:34 -0000	1.13
@@ -370,11 +370,13 @@
 
 select define_function_args('portal_element_theme__delete','theme_id');
 
-create function portal_element_theme__delete (integer)
+create or replace function portal_element_theme__delete (integer)
 returns integer as '
+declare
     p_theme_id                      alias for $1;
 begin
-    perform acs_object__delete(p_theme_id);
+    PERFORM acs_object__delete(p_theme_id);
+
     return (0);
 end;' language 'plpgsql';
 
@@ -444,8 +446,9 @@
 
 select define_function_args('portal_layout__delete','layout_id');
 
-create function portal_layout__delete(integer)
+create or replace function portal_layout__delete(integer)
 returns integer as '
+declare
     p_layout_id                     alias for $1;
 begin
     perform acs_object__delete(layout_id);
