From 8b35a60c088639739e14e95f7922e53b11c0065e Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Tue, 19 Jul 2016 11:26:53 +0530 Subject: [PATCH] Generate the proper unique name for the duplicate column name. Thanks Murtuza for reporting the issue. --- web/pgadmin/utils/driver/psycopg2/cursor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pgadmin/utils/driver/psycopg2/cursor.py b/web/pgadmin/utils/driver/psycopg2/cursor.py index ab2b8254a..1193dc4d2 100644 --- a/web/pgadmin/utils/driver/psycopg2/cursor.py +++ b/web/pgadmin/utils/driver/psycopg2/cursor.py @@ -151,7 +151,7 @@ class DictCursor(_cursor): if idx == 0: od[d.name] = 1 else: - name = ("%s-%s" % (d.name, idx)) + name = d.name while name in od: idx += 1 name = ("%s-%s" % (d.name, idx))