postgresql7.1 select unique(grantee_id) as party_id, acs_object__name(grantee_id) as name from acs_permissions where object_id = :calendar_id