Generate the proper unique name for the duplicate column name.

Thanks Murtuza for reporting the issue.
pull/3/head
Ashesh Vashi 2016-07-19 11:26:53 +05:30
parent 8e29d16eec
commit 8b35a60c08
1 changed files with 1 additions and 1 deletions

View File

@ -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))