mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-07-30 08:08:03 -05:00
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:
@@ -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(
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user