-- -- acs_reference__delete/1 -- create or replace function acs_reference__delete( p_repository_id integer ) returns int4 as $$ DECLARE v_maintainer_id acs_objects.object_id%TYPE; BEGIN select maintainer_id into v_maintainer_id from acs_reference_repositories where repository_id = p_repository_id; delete from acs_reference_repositories where repository_id = p_repository_id; perform acs_object__delete(p_repository_id); return 0; END; $$ language plpgsql;