Fixed an issue where whitespace in function bodies was not applied while generating the script using Schema Diff. Fixes #6620

This commit is contained in:
Akshay Joshi
2021-09-02 14:51:50 +05:30
parent a2c1aa2c4c
commit fcfe7fae54
6 changed files with 5 additions and 8 deletions
@@ -1891,10 +1891,6 @@ class FunctionView(PGChildNodeView, DataTypeReader, SchemaDiffObjectCompare):
self.node_type == 'procedure' and\
self.manager.sversion <= 110000
data['prosrc'] = re.sub(r"^\s+", '',
re.sub(r"\s+$", '',
data['prosrc']))
if not is_prc_version_lesser_than_11:
if data['prosrc'].startswith('\n') is False:
data['prosrc'] = ''.join(
@@ -6,7 +6,7 @@ CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
i1 integer)
VOLATILE SECURITY DEFINER PARALLEL UNSAFE
COST 100
AS begin
AS begin
select 1;
end;
@@ -7,7 +7,7 @@ CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
VOLATILE SECURITY DEFINER PARALLEL RESTRICTED
COST 120
SET application_name='pgadmin'
AS begin
AS begin
select 1;
end;
@@ -7,7 +7,7 @@ CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
VOLATILE SECURITY DEFINER PARALLEL UNSAFE
COST 100
SET application_name='pgadmin'
AS begin
AS begin
select 1;
end;
@@ -6,6 +6,6 @@ CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"(
i1 integer)
VOLATILE SECURITY DEFINER PARALLEL UNSAFE
COST 100
AS begin
AS begin
select 1;
end;