--
-- acs_group__name/1
--
create or replace function acs_group__name(
  integer
) returns varchar as $$

declare
  name__group_id         alias for $1;  
  name__group_name       varchar(200);  
begin
  select group_name
  into name__group_name
  from groups
  where group_id = name__group_id;

  return name__group_name;
  
end;$$ language plpgsql;