--
-- interval_avg/1
--
create or replace function interval_avg(
  interval[]
) returns interval as $$
interval_avg$$ language plpgsql;