postgresql7.1 declare begin acs_permission__grant_permission( object_id => :object_id, grantee_id => :party_id, privilege => :privilege ); end; declare begin acs_permission__revoke_permission( object_id => :object_id, grantee_id => :party_id, privilege => :privilege ); end; select count(*) from dual where exists (select 1 from dual where 't' = acs_permission__permission_p(:object_id, :party_id, :privilege)) select acs_object__name(:object_id) from dual update acs_objects set security_inherit_p = not security_inherit_p where object_id = :object_id