postgresql7.1 select acs_group__name(:group_id) as group_name, t.pretty_name as rel_type_pretty_name from acs_object_types t where t.object_type = :rel_type