   in i_retention_period interval,
   in i_partition_period text
 )
-  returns setof text
+  returns void
 as $$
 -------------------------------------------------------------------------------
---  Function: londiste.drop_obsolete_partitions(2)
+--  Function: londiste.drop_obsolete_partitions(3)
 --
 --    Drop obsolete partitions of partition-by-date parent table.
 --

--    i_parent_table        Master table from which partitions are inherited
--    i_retention_period    How long to keep partitions around
--    i_partition_period    One of: year, month, day, hour
--
--  Returns:
--    Names of partitions dropped
-------------------------------------------------------------------------------
declare
  _schema text not null := lower (split_part (i_parent_table, '.', 1));

       and t.tablename ~ ('^'|| _table || _expr ||'$')
       and t.tablename < _table || to_char (now() - i_retention_period, _dfmt)
  loop
    raise notice 'DROP TABLE %', _part;
    execute 'drop table '|| _part;
  end loop;
end;
$$ language plpgsql;
