Index: openacs-4/packages/acs-subsite/sql/postgresql/subsite-callbacks-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/sql/postgresql/subsite-callbacks-create.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-subsite/sql/postgresql/subsite-callbacks-create.sql	10 Feb 2009 18:31:54 -0000	1.3
+++ openacs-4/packages/acs-subsite/sql/postgresql/subsite-callbacks-create.sql	30 Mar 2013 18:04:20 -0000	1.4
@@ -163,21 +163,30 @@
 
 --   END new;
 
-create function subsite_callback__new(integer,varchar,varchar,varchar,varchar,integer)
-returns integer as '
-declare
-  new__callback_id         alias for $1; -- default null,
-  new__event_type          alias for $2;
-  new__object_type         alias for $3;
-  new__callback		   alias for $4;
-  new__callback_type       alias for $5;
-  new__sort_order          alias for $6; -- default null
+
+
+-- added
+select define_function_args('subsite_callback__new','callback_id;null,event_type,object_type,callback,callback_type,sort_order;null');
+
+--
+-- procedure subsite_callback__new/6
+--
+CREATE OR REPLACE FUNCTION subsite_callback__new(
+   new__callback_id integer, -- default null,
+   new__event_type varchar,
+   new__object_type varchar,
+   new__callback varchar,
+   new__callback_type varchar,
+   new__sort_order integer   -- default null
+
+) RETURNS integer AS $$
+DECLARE
   v_callback_id		   subsite_callbacks.callback_id%TYPE;
   v_sort_order		   subsite_callbacks.sort_order%TYPE;
-begin
+BEGIN
 
     if new__callback_id is null then
-       select nextval(''t_acs_object_id_seq'') into v_callback_id;
+       select nextval('t_acs_object_id_seq') into v_callback_id;
     else
        v_callback_id := new__callback_id;
     end if;
@@ -210,7 +219,8 @@
 --    end;
     return v_callback_id;
 
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
 
 --   procedure delete (
 --        callback_id         IN subsite_callbacks.callback_id%TYPE
@@ -220,14 +230,23 @@
 --      delete from subsite_callbacks where callback_id=subsite_callback.delete.callback_id;
 --   end delete;
 
-create function subsite_callback__delete(integer)
-returns integer as '
-declare
-  delete__callback_id		alias for $1;
-begin
+
+
+-- added
+select define_function_args('subsite_callback__delete','callback_id');
+
+--
+-- procedure subsite_callback__delete/1
+--
+CREATE OR REPLACE FUNCTION subsite_callback__delete(
+   delete__callback_id integer
+) RETURNS integer AS $$
+DECLARE
+BEGIN
       delete from subsite_callbacks where callback_id = delete__callback_id;
       return 0;
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
 
 -- end subsite_callback;
 -- /
