From 9ac08c263b109be22129c66e8253e3bce3f2b2a8 Mon Sep 17 00:00:00 2001 From: Rahul Shirsat Date: Mon, 31 May 2021 12:46:07 +0530 Subject: [PATCH] Fixed duplicate SQL issue for tables with more than one partition. Fixes #6478 --- docs/en_US/release_notes_5_4.rst | 1 + .../server_groups/servers/databases/schemas/tables/utils.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/en_US/release_notes_5_4.rst b/docs/en_US/release_notes_5_4.rst index 6f501d724..97a9c7d08 100644 --- a/docs/en_US/release_notes_5_4.rst +++ b/docs/en_US/release_notes_5_4.rst @@ -21,3 +21,4 @@ Bug fixes ********* | `Issue #4203 `_ - Fixed the issue of renaming the database by another user. +| `Issue #6478 `_ - Fixed duplicate SQL issue for tables with more than one partition. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py index a19624311..1674f2d7d 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py @@ -937,7 +937,7 @@ class BaseTableView(PGChildNodeView, BasePartitionTable, VacuumSettings): # Get all the supported constraints for partition table self._add_constrints_to_output(part_data, did, row['oid']) - partition_sql += render_template("/".join( + partition_sql = render_template("/".join( [self.partition_template_path, self._CREATE_SQL]), data=part_data, conn=self.conn) + '\n'