mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		@@ -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)))
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user