migrations: Fix do_batch_update for postgres 10.

Apparently, our do_batch_update method (used, e.g., in a pgroonga
migration) was using semi-invalid syntax that was removed in postgres
10.

Thanks to Ilya Evseev for the report.

Fixes #11063.
This commit is contained in:
Tim Abbott 2018-12-16 17:44:31 -08:00
parent 2cca6a1be8
commit 430ed061c1
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ def do_batch_update(cursor: CursorObj,
escape: bool=True) -> None: # nocoverage
stmt = '''
UPDATE %s
SET (%s) = (%s)
SET (%s) = ROW(%s)
WHERE id >= %%s AND id < %%s
''' % (table, ', '.join(cols), ', '.join(['%s'] * len(cols)))