From f56b4030f1a8b1fa3444fccd23c3e189149e4b1b Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Thu, 6 Jan 2022 13:08:50 +0530 Subject: [PATCH] Fixed a schema diff issue where generated script adds unwanted line endings for Functions/Procedures/Trigger Functions. Fixes #7102 --- docs/en_US/release_notes_6_4.rst | 1 + .../servers/databases/schemas/functions/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en_US/release_notes_6_4.rst b/docs/en_US/release_notes_6_4.rst index 87a91c990..9ab7cdee8 100644 --- a/docs/en_US/release_notes_6_4.rst +++ b/docs/en_US/release_notes_6_4.rst @@ -28,3 +28,4 @@ Bug fixes | `Issue #7081 `_ - Fixed an issue in SQL generation for PostgreSQL-14 functions. | `Issue #7093 `_ - Fixed an issue where SubPlans may overlap other nodes & make them inaccessible in Graphical EXPLAIN View. | `Issue #7096 `_ - Ensure that Truncate and Reset statistics should work. +| `Issue #7102 `_ - Fixed a schema diff issue where generated script adds unwanted line endings for Functions/Procedures/Trigger Functions. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py index b91772575..0cd66d652 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py @@ -1896,7 +1896,8 @@ class FunctionView(PGChildNodeView, DataTypeReader, SchemaDiffObjectCompare): data['schema'] = target_schema status, sql = self._get_sql(gid=gid, sid=sid, did=did, scid=scid, data=data, fnid=oid, is_sql=False, - is_schema_diff=True) + is_schema_diff=True, + allow_code_formatting=False) # Check if return type is changed then we need to drop the # function first and then recreate it. if 'prorettypename' in data: