postgresql7.1 select acs_group__name(:group_id) as group_name, coalesce(acs_rel_type__role_pretty_plural(t.role_two),'Elements') as role_pretty_plural from acs_rel_types t where t.rel_type = :rel_type