diff options
-rw-r--r-- | sql/londiste/functions/londiste.global_add_table.sql | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/londiste/functions/londiste.global_add_table.sql b/sql/londiste/functions/londiste.global_add_table.sql index e64315cf..b3aebfc5 100644 --- a/sql/londiste/functions/londiste.global_add_table.sql +++ b/sql/londiste/functions/londiste.global_add_table.sql @@ -43,6 +43,13 @@ begin select 200, 'Table added: ' || i_table_name into ret_code, ret_note; return; + +exception + -- seems the row was added from parallel connection (setup vs. replay) + when unique_violation then + select 200, 'Table already added: ' || i_table_name + into ret_code, ret_note; + return; end; $$ language plpgsql strict; |