        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;
-    return next _part;
   end loop;
 end;
 $$ language plpgsql;

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

    raise exception 'not supported i_partition_period: %', i_partition_period;
  end if;

  if length (_table) = 0 then
    _table := _schema;
    _schema := 'public';
  end if;

  for _part in
    select quote_ident (t.schemaname) ||'.'|| quote_ident (t.tablename)
      from pg_catalog.pg_tables t
