diff --git a/LTA/ltastorageoverview/lib/ltaso/create_db_ltastorageoverview.sql b/LTA/ltastorageoverview/lib/ltaso/create_db_ltastorageoverview.sql index 62a2e1f12b329e56bdebd0a93da228dd74aad4d1..52e6dcb2ee32fb8ff215cef0f018183a7f5402e2 100644 --- a/LTA/ltastorageoverview/lib/ltaso/create_db_ltastorageoverview.sql +++ b/LTA/ltastorageoverview/lib/ltaso/create_db_ltastorageoverview.sql @@ -373,6 +373,8 @@ $BODY$ LANGUAGE plpgsql VOLATILE COST 100; +-- use DEFERRABLE INITIALLY DEFERRED CONSTRAINT trigger which fires only once upon committing the file inserts +-- then run method on_directory_update_cache_commit_do_update_dir_stats to collect all inserted fileinfo's into dir/tree stats CREATE CONSTRAINT TRIGGER trigger_on_directory_update_cache_commit_do_update_dir_stats AFTER INSERT ON lta._directory_update_cache