Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.0d5-5.9.0d6.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.0d5-5.9.0d6.sql,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.0d5-5.9.0d6.sql	27 Jul 2015 12:51:21 -0000	1.1
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.0d5-5.9.0d6.sql	1 Sep 2016 10:32:06 -0000	1.1.2.1
@@ -7,18 +7,20 @@
 --
 -- procedure acs_permission__grant_permission/3
 --
+DROP FUNCTION acs_permission__grant_permission(integer, integer, varchar);
+
 CREATE OR REPLACE FUNCTION acs_permission__grant_permission(
-   grant_permission__object_id integer,
-   grant_permission__grantee_id integer,
-   grant_permission__privilege varchar
+   p_object_id integer,
+   p_grantee_id integer,
+   p_privilege varchar
 ) RETURNS integer AS $$
 DECLARE
 BEGIN
     insert into acs_permissions
       (object_id, grantee_id, privilege)
       values
-      (grant_permission__object_id, grant_permission__grantee_id, 
-      grant_permission__privilege);
+      (p_object_id, p_grantee_id, 
+      p_privilege);
     
     return 0;
 EXCEPTION 
@@ -31,17 +33,19 @@
 --
 -- procedure acs_permission__revoke_permission/3
 --
+DROP FUNCTION acs_permission__revoke_permission(integer, integer, varchar);
+
 CREATE OR REPLACE FUNCTION acs_permission__revoke_permission(
-   revoke_permission__object_id integer,
-   revoke_permission__grantee_id integer,
-   revoke_permission__privilege varchar
+   p_object_id integer,
+   p_grantee_id integer,
+   p_privilege varchar
 ) RETURNS integer AS $$
 DECLARE
 BEGIN
     delete from acs_permissions
-    where object_id = revoke_permission__object_id
-    and grantee_id = revoke_permission__grantee_id
-    and privilege = revoke_permission__privilege;
+    where object_id = p_object_id
+    and grantee_id = p_grantee_id
+    and privilege = p_privilege;
 
     return 0; 
 END;
