 BEGIN
 	result.staged = entity_tag.transfer_to_staging(type_name);
 
-    process_result = entity_tag.process_staged_links();
+    process_result = entity_tag.process_staged_links(update_limit);
 
 	result.tags_added = process_result.tags_added;
 	result.links_added = process_result.links_added;

);


CREATE OR REPLACE FUNCTION entity_tag.process_staged_links()
	RETURNS entity_tag.process_staged_links_result
AS $$
DECLARE
    result entity_tag.process_staged_links_result;
BEGIN
	result.tags_added = entity_tag.add_new_tags();
	result.links_added = entity_tag.add_new_links();
	result.links_removed = entity_tag.remove_obsolete_links();

	TRUNCATE entity_tag.entitytaglink_staging;

);


CREATE OR REPLACE FUNCTION entity_tag.update(type_name name, update_limit integer DEFAULT 50000)
	RETURNS entity_tag.update_result
AS $$
DECLARE
