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

View File

@ -32,6 +32,7 @@ Bug fixes
| `Issue #6564 <https://redmine.postgresql.org/issues/6564>`_ - Fixed an issue where columns with sequences get altered unnecessarily with a schema diff tool.
| `Issue #6570 <https://redmine.postgresql.org/issues/6570>`_ - Ensure that the lock panel should not be blocked for larger records.
| `Issue #6572 <https://redmine.postgresql.org/issues/6572>`_ - Partially fixes the data output panel display issue.
| `Issue #6620 <https://redmine.postgresql.org/issues/6620>`_ - Fixed an issue where whitespace in function bodies was not applied while generating the script using Schema Diff.
| `Issue #6627 <https://redmine.postgresql.org/issues/6627>`_ - Introduced OAUTH2_SCOPE variable for the Oauth2 scope configuration.
| `Issue #6641 <https://redmine.postgresql.org/issues/6641>`_ - Enables pgAdmin to retrieve user permissions in case of nested roles which helps to terminate the session for AWS RDS.
| `Issue #6663 <https://redmine.postgresql.org/issues/6663>`_ - Fixed no attribute '_asdict' error when connecting the database server.

View File

@ -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(

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;