From a025dc49d8962517a44f13f2957f2f47d6fd71ba Mon Sep 17 00:00:00 2001 From: Daniel Marin Date: Thu, 16 Jan 2025 13:23:36 +0100 Subject: [PATCH] refactor(gw_fct_check_fprocess, gw_fct_om_check_data): clean up logging and enhance temp table creation - Removed unnecessary RAISE NOTICE statements in gw_fct_check_fprocess to streamline the function. - Added dynamic execution of log table creation in gw_fct_om_check_data for better handling of temporary tables based on fid. - Improved overall clarity and maintainability of the SQL functions. --- utils/fct/gw_fct_check_fprocess.sql | 3 --- utils/fct/gw_fct_om_check_data.sql | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/fct/gw_fct_check_fprocess.sql b/utils/fct/gw_fct_check_fprocess.sql index 1a6e7c6cd..e1df373f0 100644 --- a/utils/fct/gw_fct_check_fprocess.sql +++ b/utils/fct/gw_fct_check_fprocess.sql @@ -57,8 +57,6 @@ BEGIN v_process_except_level FROM sys_fprocess WHERE fid = v_check_fid; - RAISE NOTICE 'v_process_query_text ANTES:::::::: %',v_process_query_text; - -- replace variables (usando COALESCE para evitar NULLs) v_exceptable_id = concat(replace (v_process_except_table, 'anl_', ''), '_id'); v_exceptable_catalog = concat(replace (v_process_except_table, 'anl_', ''), 'cat_id'); @@ -66,7 +64,6 @@ BEGIN v_process_info_msg = COALESCE(replace(v_process_info_msg, 'v_graphClass', COALESCE(v_graphClass, '')), v_process_info_msg); v_process_except_msg = COALESCE(replace(v_process_except_msg, 'v_graphClass', COALESCE(v_graphClass, '')), v_process_except_msg); - RAISE NOTICE 'v_process_query_text DESPUÉS:::::::: %',v_process_query_text; -- manage query count IF v_process_query_text ILIKE '%string_agg%' AND v_process_fid <> 317 THEN diff --git a/utils/fct/gw_fct_om_check_data.sql b/utils/fct/gw_fct_om_check_data.sql index 6f07fce6a..a590a5d73 100644 --- a/utils/fct/gw_fct_om_check_data.sql +++ b/utils/fct/gw_fct_om_check_data.sql @@ -51,6 +51,7 @@ BEGIN -- create temp tables IF v_fid = 125 THEN + EXECUTE 'SELECT gw_fct_create_logtables($${"data":{"parameters":{"fid":'||v_fid||'}}}$$::json)'; EXECUTE 'SELECT gw_fct_create_querytables($${"data":{"verifiedExceptions":'||COALESCE(v_verified_exceptions, 'false')||',"selectionMode":"'||COALESCE(v_selection_mode, 'userSelectors')||'", "checkPsectors":"'||COALESCE(v_checkpsectors, 'false')||'"}}$$::json)'; END IF;