diff --git a/api/alembic/versions/sql/0002_functions.sql b/api/alembic/versions/sql/0002_functions.sql index cdf70dc..2277d26 100644 --- a/api/alembic/versions/sql/0002_functions.sql +++ b/api/alembic/versions/sql/0002_functions.sql @@ -4075,7 +4075,7 @@ $function$ -- DROP FUNCTION v3.v_form1_smeta(int4, int4); -CREATE FUNCTION v3.v_form1_smeta(p_year INT, p_org_unit_id INT) +CREATE OR REPLACE FUNCTION v3.v_form1_smeta(p_year INT, p_org_unit_id INT) RETURNS TABLE ( row_type VARCHAR, depth INT, @@ -4093,8 +4093,7 @@ RETURNS TABLE ( supp_corr_q2 NUMERIC, supp_corr_q3 NUMERIC, supp_corr_q4 NUMERIC, dev_corr_q2 NUMERIC, dev_corr_q3 NUMERIC, dev_corr_q4 NUMERIC ) -AS $$ -#variable_conflict use_column +AS $function$ DECLARE v_ahr INT; v_cap INT; v_oper INT; v_sections TEXT[] := ARRAY['plan','approved','q1','q2','q3','q4']; @@ -4223,7 +4222,9 @@ BEGIN FROM merged m ORDER BY m.sc; END; -$$ LANGUAGE plpgsql STABLE SET search_path = v3, pg_catalog; +$function$ +LANGUAGE plpgsql STABLE SET search_path = v3, pg_catalog +; -- DROP FUNCTION v3.v_form2_sheet_sections(int4, varchar, _text);