\set ON_ERROR_ROLLBACK 1
\set ON_ERROR_STOP true

BEGIN;

SELECT set_config('search_path','mimeo, dblink, public',false);

SELECT plan(2);


--SELECT logdel_maker('mimeo_source.dml_test_source', data_source_id, p_pulldata := false, 'mimeo_dest.dml_test_dest_multi0') FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';

--SELECT throws_ok('SELECT logdel_maker(''mimeo_source.dml_test_source'', data_source_id, p_pulldata := false, ''mimeo_dest.dml_test_dest_multi98'') FROM dblink_mapping_mimeo WHERE username = ''mimeo_test'''
--  , 'Limit of 99 queue tables for a single source table reached. No more destination tables possible (and HIGHLY discouraged)'
--  , 'Testing max multiple destination tables for dml replication');

SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi1', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi2', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi3', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi4', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi5', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi6', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi7', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi8', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi9', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi10', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi11', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi12', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi13', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi14', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi15', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi16', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi17', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi18', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi19', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi20', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi21', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi22', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi23', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi24', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi25', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi26', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi27', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi28', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi29', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi30', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi31', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi32', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi33', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi34', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi35', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi36', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi37', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi38', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi39', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi40', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi41', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi42', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi43', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi44', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi45', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi46', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi47', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi48', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi49', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi50', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi51', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi52', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi53', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi54', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi55', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi56', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi57', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi58', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi59', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi60', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi61', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi62', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi63', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi64', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi65', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi66', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi67', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi68', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi69', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi70', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi71', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi72', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi73', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi74', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi75', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi76', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi77', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi78', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi79', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi80', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi81', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi82', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi83', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi84', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi85', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi86', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi87', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi88', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi89', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi90', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi91', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi92', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi93', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi94', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi95', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi96', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi97', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT dml_maker('mimeo_source.dml_test_source', data_source_id, 'mimeo_dest.dml_test_dest_multi98', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';

SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi1', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi2', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi3', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi4', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi5', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi6', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi7', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi8', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi9', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi10', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi11', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi12', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi13', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi14', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi15', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi16', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi17', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi18', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi19', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi20', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi21', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi22', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi23', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi24', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi25', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi26', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi27', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi28', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi29', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi30', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi31', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi32', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi33', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi34', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi35', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi36', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi37', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi38', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi39', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi40', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi41', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi42', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi43', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi44', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi45', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi46', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi47', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi48', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi49', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi50', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi51', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi52', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi53', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi54', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi55', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi56', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi57', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi58', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi59', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi60', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi61', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi62', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi63', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi64', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi65', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi66', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi67', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi68', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi69', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi70', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi71', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi72', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi73', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi74', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi75', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi76', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi77', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi78', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi79', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi80', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi81', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi82', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi83', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi84', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi85', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi86', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi87', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi88', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi89', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi90', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi91', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi92', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi93', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi94', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi95', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi96', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi97', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';
SELECT logdel_maker('mimeo_source.logdel_test_source', data_source_id, 'mimeo_dest.logdel_test_dest_multi98', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = 'mimeo_test';

SELECT throws_ok('SELECT dml_maker(''mimeo_source.dml_test_source'', data_source_id, ''mimeo_dest.dml_test_dest_multi99'', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = ''mimeo_test'''
    , 'dml_maker() failure. Unable to clean up source database objects (trigger/queue table) if they were made. SQLERRM: Limit of 99 queue tables for a single source table reached. No more destination tables possible (and HIGHLY discouraged) '
    , 'Testing max multiple destination tables for dml replication');

SELECT throws_ok('SELECT logdel_maker(''mimeo_source.logdel_test_source'', data_source_id, ''mimeo_dest.logdel_test_dest_multi99'', p_pulldata := false) FROM dblink_mapping_mimeo WHERE username = ''mimeo_test'''
    , 'logdel_maker() failure. Unable to clean up source database objects (trigger/queue table) if they were made. SQLERRM: Limit of 99 queue tables for a single source table reached. No more destination tables possible (and HIGHLY discouraged) '
    , 'Testing max multiple destination tables for logdel replication');

SELECT * FROM finish();

ROLLBACK;
