]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
fix: drop unneeded flush after executemany
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 28 Mar 2022 16:11:06 +0000 (18:11 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 2 Apr 2022 23:23:22 +0000 (01:23 +0200)
As per @dlax analysis, it is not needed. It was part of an attempt to
fix the problem of rowcount broken when executemany is called from within
a pipeline block, but that doesn't work anyway.

psycopg/psycopg/cursor.py

index 40aacf15fe2e8e3943e6f9bac7fc92c2b4b8cfd7..cef1104de8840b9fa2661a2b4727d523023ac3bc 100644 (file)
@@ -240,8 +240,6 @@ class BaseCursor(Generic[ConnectionType, Row]):
         for cmd in self._conn._prepared.get_maintenance_commands():
             yield from self._conn._exec_command(cmd)
 
-        yield from pipeline._flush_gen()
-
     def _executemany_gen_no_pipeline(
         self, query: Query, params_seq: Iterable[Params], returning: bool
     ) -> PQGen[None]: