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

declare
    p_message_id   alias for $1;
    v_message_name   cr_revisions.title%TYPE;
begin
    select title into v_message_name
        from acs_messages_all
        where message_id = p_message_id;
    return v_message_name;
end;$$ language plpgsql;