From eb1bd1d72f8f6d772d9d9e7b283fb5579fd21506 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Tue, 31 Jul 2007 14:27:18 +0000 Subject: [PATCH] Make "provider remove" not fail if the table does not exist. Patch by Dimitri Fontaine. --- sql/londiste/functions/londiste.provider_remove_table.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sql/londiste/functions/londiste.provider_remove_table.sql b/sql/londiste/functions/londiste.provider_remove_table.sql index 6143bb2c..8308459d 100644 --- a/sql/londiste/functions/londiste.provider_remove_table.sql +++ b/sql/londiste/functions/londiste.provider_remove_table.sql @@ -17,7 +17,12 @@ begin raise exception 'no such table registered'; end if; - execute 'drop trigger ' || tgname || ' on ' || i_table_name; + begin + execute 'drop trigger ' || tgname || ' on ' || i_table_name; + exception + when undefined_table then + raise notice 'table % does not exist', i_table_name; + end; delete from londiste.provider_table where queue_name = i_queue_name -- 2.39.5