From: martinko Date: Sat, 7 Dec 2013 15:15:44 +0000 (+0100) Subject: updated londiste.upgrade_schema with fix for londiste.table_info trigger issue X-Git-Tag: skytools_3_2^2~19 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=3a833924eca524a9ca5a134cacf89369179bab98;p=skytools.git updated londiste.upgrade_schema with fix for londiste.table_info trigger issue --- diff --git a/sql/londiste/functions/londiste.upgrade_schema.sql b/sql/londiste/functions/londiste.upgrade_schema.sql index a0cf11e2..508daea2 100644 --- a/sql/londiste/functions/londiste.upgrade_schema.sql +++ b/sql/londiste/functions/londiste.upgrade_schema.sql @@ -28,6 +28,18 @@ begin alter table londiste.table_info add column dest_table text; end if; + -- table_info: change trigger timing + perform 1 from information_schema.triggers + where event_object_schema = 'londiste' + and event_object_table = 'table_info' + and trigger_name = 'table_info_trigger_sync' + and condition_timing = 'AFTER'; + if found then + drop trigger table_info_trigger_sync on londiste.table_info; + create trigger table_info_trigger_sync before delete on londiste.table_info + for each row execute procedure londiste.table_info_trigger(); + end if; + -- applied_execute.dest_table perform 1 from information_schema.columns where table_schema = 'londiste'