public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin][RM6981]: SQL for index shows same column multiple times
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin][RM6981]: SQL for index shows same column multiple times
@ 2021-11-15 09:59  Pradip Parkale <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Pradip Parkale @ 2021-11-15 09:59 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Akshay,

Please find the attached patch for #6981 SQL for index shows same column
multiple times.

-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


Attachments:

  [application/octet-stream] RM6981.patch (894B, 3-RM6981.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/utils.py
index 09ef2f9dc..cd8679d3d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/utils.py
@@ -99,6 +99,9 @@ def get_column_details(conn, idx, data, mode='properties', template_path=None):
         "/".join([template_path, 'column_details.sql']), idx=idx
     )
     status, rset = conn.execute_2darray(SQL)
+    # Remove column if duplicate column is present in list.
+    rset['rows'] = [i for n, i in enumerate(rset['rows']) if
+                    i not in rset['rows'][n + 1:]]
     if not status:
         return internal_server_error(errormsg=rset)
 
* Unmerged path web/yarn.lock


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin][RM6981]: SQL for index shows same column multiple times
@ 2021-11-15 11:08  Akshay Joshi <[email protected]>
  parent: Pradip Parkale <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Akshay Joshi @ 2021-11-15 11:08 UTC (permalink / raw)
  To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers

Thanks, the patch applied.

On Mon, Nov 15, 2021 at 3:29 PM Pradip Parkale <
[email protected]> wrote:

> Hi Akshay,
>
> Please find the attached patch for #6981 SQL for index shows same column
> multiple times.
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-11-15 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 09:59 [pgAdmin][RM6981]: SQL for index shows same column multiple times Pradip Parkale <[email protected]>
2021-11-15 11:08 ` Akshay Joshi <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox