Ensure the last placeholder is included when generating UPDATE scripts for tables. Fixes #2436

This commit is contained in:
Murtuza Zabuawala 2017-05-26 10:59:09 -04:00 committed by Dave Page
parent a45bb905f5
commit 45d423c0ce

View File

@ -2870,9 +2870,9 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
if len(columns) > 0:
if len(columns) == 1:
columns = columns[0]
columns += "=?"
else:
columns = "=?, ".join(columns)
columns += "=?"
sql = u"UPDATE {0}\n\tSET {1}\n\tWHERE <condition>;".format(
self.qtIdent(self.conn, data['schema'], data['name']),