Skip to content

Commit

Permalink
fix(ws, test): minor bug fixes on some fct and dml_issue_30
Browse files Browse the repository at this point in the history
  • Loading branch information
danimarinBG committed Jan 22, 2025
1 parent fcddb17 commit e589ab7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions updates/40/40000/utils/dml_issue_30.sql
Original file line number Diff line number Diff line change
Expand Up @@ -945,9 +945,9 @@ query_text = '
WITH
outlayer AS (SELECT ((value::json->>''elevation'')::json->>''max'')::numeric as max_elev,
((value::json->>''elevation'')::json->>''min'')::numeric as min_elev FROM config_param_system WHERE parameter = ''epa_outlayer_values'')
select node_id, nodecat_id from outlayer, node where top_elev < min_elev or top_elev > max_elev
select node_id, nodecat_id from outlayer, node where elevation < min_elev or elevation > max_elev
union
select connec_id, conneccat_id from outlayer, connec where top_elev < min_elev or top_elev > max_elev',
select connec_id, conneccat_id from outlayer, connec where elevation < min_elev or elevation > max_elev',
except_table = null,
function_name = '[gw_fct_pg2epa_check_result]',
active = true
Expand Down
2 changes: 2 additions & 0 deletions utils/fct/gw_fct_create_querytables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ BEGIN
END IF;

-- create log tables
DELETE FROM audit_check_data WHERE fid in (select fid from t_audit_check_data) and cur_user=current_user;
DROP TABLE IF EXISTS t_audit_check_data; EXECUTE 'CREATE TEMP TABLE t_audit_check_data AS SELECT * FROM audit_check_data';
DELETE FROM audit_check_project WHERE fid in (select fid from t_audit_check_project) and cur_user=current_user;
DROP TABLE IF EXISTS t_audit_check_project; EXECUTE 'CREATE TEMP TABLE t_audit_check_project AS SELECT * FROM audit_check_project';


Expand Down
4 changes: 2 additions & 2 deletions ws/fct/ws_gw_fct_pg2epa_main.sql
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ BEGIN
CREATE TEMP TABLE t_pgr_go2epa_arc (LIKE SCHEMA_NAME.temp_arc INCLUDING ALL);
CREATE TEMP TABLE t_pgr_go2epa_node (LIKE SCHEMA_NAME.temp_node INCLUDING ALL);

-- create log tables
EXECUTE 'SELECT gw_fct_create_logtables($${"data":{"parameters":{"fid":'||v_fid||'}}}$$::json)';
-- create query tables
EXECUTE 'SELECT gw_fct_create_querytables($${"data":{"parameters":{"fid":'||v_fid||',
"epaCheck":true, "verifiedExceptions":false}}}$$::json)';
-- create log tables
EXECUTE 'SELECT gw_fct_create_logtables($${"data":{"parameters":{"fid":'||v_fid||'}}}$$::json)';

-- getting selectors
SELECT array_agg(expl_id) INTO v_expl_id FROM selector_expl WHERE expl_id > 0 AND cur_user = current_user;
Expand Down

0 comments on commit e589ab7

Please sign in to comment.