--
-- news__revision_delete/1
--
create or replace function news__revision_delete(
  integer
) returns int4 as $$

declare
    p_revision_id alias for $1;
begin
    -- delete from cr_news table
    delete from cr_news
    where  news_id = p_revision_id;

    -- delete revision
    PERFORM content_revision__delete(
        p_revision_id -- revision_id
    );

    return 0;
end;
$$ language plpgsql;