From aa9a4c30d359dde6d4e04d5e60431d1318700acb Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Mon, 3 May 2021 14:53:21 +0530 Subject: [PATCH] =?UTF-8?q?Fixed=20an=20issue=20where=20duplicate=C2=A0col?= =?UTF-8?q?umns=20are=20visible=20in=20the=20browser=20tree,=20which=20is?= =?UTF-8?q?=20owned=20by=20two=20sequences.=20Fixes=20#6413?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en_US/release_notes_5_3.rst | 1 + .../schemas/tables/templates/columns/sql/9.2_plus/nodes.sql | 2 +- .../schemas/tables/templates/columns/sql/default/nodes.sql | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_5_3.rst b/docs/en_US/release_notes_5_3.rst index fb0637dc0..66cf86a52 100644 --- a/docs/en_US/release_notes_5_3.rst +++ b/docs/en_US/release_notes_5_3.rst @@ -25,5 +25,6 @@ Bug fixes | `Issue #6377 `_ - Fixed an issue where schema diff does not create DROP DEFAULT statement for columns. | `Issue #6385 `_ - Ensure that Backup and Restore should work on shared servers. | `Issue #6408 `_ - Fixed ModuleNotFoundError when running setup.py from outside of the root. +| `Issue #6413 `_ - Fixed an issue where duplicate columns are visible in the browser tree, which is owned by two sequences. | `Issue #6416 `_ - Added comment column in the properties panel for View and Materialized View collection node. | `Issue #6417 `_ - Fixed an issue where query editor is not being closed if the user clicks on the 'Don't Save' button. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/nodes.sql index ca0116a11..128eb6d63 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/nodes.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/nodes.sql @@ -1,4 +1,4 @@ -SELECT att.attname as name, att.attnum as OID, pg_catalog.format_type(ty.oid,NULL) AS datatype, +SELECT DISTINCT att.attname as name, att.attnum as OID, pg_catalog.format_type(ty.oid,NULL) AS datatype, att.attnotnull as not_null, att.atthasdef as has_default_val FROM pg_catalog.pg_attribute att JOIN pg_catalog.pg_type ty ON ty.oid=atttypid diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/nodes.sql index 259553880..2648e65ed 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/nodes.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/nodes.sql @@ -1,4 +1,4 @@ -SELECT att.attname as name, att.attnum as OID, pg_catalog.format_type(ty.oid,NULL) AS datatype, +SELECT DISTINCT att.attname as name, att.attnum as OID, pg_catalog.format_type(ty.oid,NULL) AS datatype, att.attnotnull as not_null, att.atthasdef as has_default_val FROM pg_catalog.pg_attribute att JOIN pg_catalog.pg_type ty ON ty.oid=atttypid