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

declare
       delete__interval_id	alias for $1;
begin
	
       delete from time_intervals
       where  interval_id = delete__interval_id;

       return 0;

end;$$ language plpgsql;