Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.1d10-5.9.1d11.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.1d10-5.9.1d11.sql,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.1d10-5.9.1d11.sql	5 Jul 2016 16:35:23 -0000	1.1.2.1
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.1d10-5.9.1d11.sql	6 Jul 2016 07:40:56 -0000	1.1.2.2
@@ -244,10 +244,8 @@
        p_party_id  integer, 
        p_privilege varchar
 ) RETURNS table (object_id integer, orig_object_id integer) AS $$
-BEGIN
-  RETURN QUERY SELECT acs_permission.permission_p_recursive_array(p_objects, p_party_id, p_privilege);
-END; 
-$$ LANGUAGE plpgsql stable;
+  SELECT acs_permission.permission_p_recursive_array(p_objects, p_party_id, p_privilege);
+$$ LANGUAGE sql stable;
 
 
 select define_function_args('acs_permission__grant_permission','object_id,grantee_id,privilege');
