Index: openacs-4/packages/acs-service-contract/sql/postgresql/upgrade/upgrade-4.7d2-4.7d3.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/sql/postgresql/upgrade/upgrade-4.7d2-4.7d3.sql,v
diff -u -N -r1.2 -r1.3
--- openacs-4/packages/acs-service-contract/sql/postgresql/upgrade/upgrade-4.7d2-4.7d3.sql	16 Sep 2003 08:29:59 -0000	1.2
+++ openacs-4/packages/acs-service-contract/sql/postgresql/upgrade/upgrade-4.7d2-4.7d3.sql	30 Mar 2013 17:40:53 -0000	1.3
@@ -9,19 +9,27 @@
 
 update acs_sc_impls set impl_pretty_name = impl_name;
 
-create or replace function acs_sc_impl__new(varchar,varchar,varchar,varchar)
-returns integer as '
-declare
-    p_impl_contract_name        alias for $1;
-    p_impl_name                 alias for $2;
-    p_impl_pretty_name          alias for $3;
-    p_impl_owner_name           alias for $4;
+
+
+-- added
+select define_function_args('acs_sc_impl__new','impl_contract_name,impl_name,impl_pretty_name,impl_owner_name');
+
+--
+-- procedure acs_sc_impl__new/4
+--
+CREATE OR REPLACE FUNCTION acs_sc_impl__new(
+   p_impl_contract_name varchar,
+   p_impl_name varchar,
+   p_impl_pretty_name varchar,
+   p_impl_owner_name varchar
+) RETURNS integer AS $$
+DECLARE
     v_impl_id                   integer;
-begin
+BEGIN
 
     v_impl_id := acs_object__new(
                 null,
-                ''acs_sc_implementation'',
+                'acs_sc_implementation',
                 now(),
                 null,
                 null,
@@ -44,7 +52,8 @@
 
     return v_impl_id;
 
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
 
 
 drop view valid_uninstalled_bindings;
