From e81cc4d734d4368b97170aebb48d49bd25a5fd34 Mon Sep 17 00:00:00 2001 From: mattiagiupponi <51856725+mattiagiupponi@users.noreply.github.com> Date: Wed, 11 Oct 2023 12:05:25 +0200 Subject: [PATCH 1/3] Update functions.sql --- database/functions.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/database/functions.sql b/database/functions.sql index 1c489fd..6476410 100644 --- a/database/functions.sql +++ b/database/functions.sql @@ -2332,6 +2332,7 @@ BEGIN 'COPDCI0000', 'COPDIN0000' ) + AND esclusione_m2_m3a = False AND nr_contat >= 1 AND NOT EXISTS ( --select 0 from defalco_child dfc @@ -2358,6 +2359,7 @@ BEGIN 'COPDCI0000', 'COPDIN0000' ) + AND esclusione_m2_m3a = False and nr_contat >= 1 ) aa on as2.ids_codi_1 = aa.id_condotta From a9cf60e087b868ac4039ea1ed236f3f533ca6014 Mon Sep 17 00:00:00 2001 From: mattiagiupponi <51856725+mattiagiupponi@users.noreply.github.com> Date: Thu, 12 Oct 2023 09:36:01 +0200 Subject: [PATCH 2/3] Update functions.sql --- database/functions.sql | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/database/functions.sql b/database/functions.sql index 6476410..b3c287a 100644 --- a/database/functions.sql +++ b/database/functions.sql @@ -2282,8 +2282,12 @@ $$ LANGUAGE plpgsql -- OUT: BOOLEAN -- Example: -- select DBIAIT_ANALYSIS.populate_acq_shape_utenze_mis(); -CREATE OR REPLACE FUNCTION DBIAIT_ANALYSIS.populate_acq_shape_utenze_mis( -) RETURNS BOOLEAN AS $$ +CREATE OR REPLACE FUNCTION dbiait_analysis.populate_acq_shape_utenze_mis() + RETURNS boolean + LANGUAGE plpgsql + SECURITY DEFINER + SET search_path TO 'public', 'dbiait_analysis' +AS $function$ BEGIN SET work_mem = '256MB'; --(utenze_misuratore) @@ -2359,7 +2363,7 @@ BEGIN 'COPDCI0000', 'COPDIN0000' ) - AND esclusione_m2_m3a = False + and esclusione_m2_m3a = False and nr_contat >= 1 ) aa on as2.ids_codi_1 = aa.id_condotta From 94e7a93bd6fa368e9d3749f6e5faad7a2a60ca81 Mon Sep 17 00:00:00 2001 From: mattiagiupponi <51856725+mattiagiupponi@users.noreply.github.com> Date: Thu, 12 Oct 2023 09:36:51 +0200 Subject: [PATCH 3/3] Update functions.sql --- database/functions.sql | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/database/functions.sql b/database/functions.sql index b3c287a..b5c7680 100644 --- a/database/functions.sql +++ b/database/functions.sql @@ -2282,12 +2282,8 @@ $$ LANGUAGE plpgsql -- OUT: BOOLEAN -- Example: -- select DBIAIT_ANALYSIS.populate_acq_shape_utenze_mis(); -CREATE OR REPLACE FUNCTION dbiait_analysis.populate_acq_shape_utenze_mis() - RETURNS boolean - LANGUAGE plpgsql - SECURITY DEFINER - SET search_path TO 'public', 'dbiait_analysis' -AS $function$ +CREATE OR REPLACE FUNCTION DBIAIT_ANALYSIS.populate_acq_shape_utenze_mis( +) RETURNS BOOLEAN AS $$ BEGIN SET work_mem = '256MB'; --(utenze_misuratore)