From: Daniele Varrazzo Date: Mon, 28 Mar 2022 16:11:06 +0000 (+0200) Subject: fix: drop unneeded flush after executemany X-Git-Tag: 3.1~145^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f23d479e1e069f4c867719536a54b1f1f78c88ee;p=thirdparty%2Fpsycopg.git fix: drop unneeded flush after executemany 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. --- diff --git a/psycopg/psycopg/cursor.py b/psycopg/psycopg/cursor.py index 40aacf15f..cef1104de 100644 --- a/psycopg/psycopg/cursor.py +++ b/psycopg/psycopg/cursor.py @@ -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]: