From: martinko Date: Thu, 19 Sep 2013 12:46:01 +0000 (+0200) Subject: londiste.drop_obsolete_partitions: drop tables in alphabetical order (that is from... X-Git-Tag: skytools_3_2^2~35 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=185ced570b0fee134dbf2913f02c9f5d375f1a29;p=skytools.git londiste.drop_obsolete_partitions: drop tables in alphabetical order (that is from the oldest) --- diff --git a/sql/londiste/functions/londiste.drop_obsolete_partitions.sql b/sql/londiste/functions/londiste.drop_obsolete_partitions.sql index ee18d904..4346724e 100644 --- a/sql/londiste/functions/londiste.drop_obsolete_partitions.sql +++ b/sql/londiste/functions/londiste.drop_obsolete_partitions.sql @@ -54,6 +54,7 @@ begin where t.schemaname = _schema and t.tablename ~ ('^'|| _table || _expr ||'$') and t.tablename < _table || to_char (now() - i_retention_period, _dfmt) + order by 1 loop execute 'drop table '|| _part; return next _part;