]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
docs: add news entry about executemany() speedup
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 28 Mar 2022 18:07:32 +0000 (20:07 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 2 Apr 2022 23:23:22 +0000 (01:23 +0200)
docs/news.rst
tests/test_pipeline.py

index 3fa17bb3300f6be4ec02459e54a2063f70ffe1ae..66e43178b412fe1bab4efc548a546cf791024094 100644 (file)
@@ -16,6 +16,8 @@ Psycopg 3.1 (unreleased)
 - Add :ref:`Two-Phase Commit <two-phase-commit>` support (:ticket:`#72`).
 - Add ``returning`` parameter to `~Cursor.executemany()` to retrieve query
   results (:ticket:`#164`).
+- `~Cursor.executemany()` performance improved by using batch mode internally
+  (:ticket:`#145`).
 - Add `pq.PGconn.trace()` and related trace functions (:ticket:`#167`).
 - Add ``prepare_threshold`` parameter to `Connection` init (:ticket:`#200`).
 - Add `Error.pgconn` and `Error.pgresult` attributes (:ticket:`#242`).
index 49a1bca17332d46538efdd2112276604b0cdb2ed..62a66acb109561dddc599d330dd51b1d38ebcdf9 100644 (file)
@@ -187,7 +187,7 @@ def test_executemany_rowcount(conn):
             [(10,), (20,)],
         )
 
-        # TODO: this is a bug. It is caused by reentering the pipeline mode in
+        # TODO: failing. It is caused by reentering the pipeline mode in
         # executemany(). Leaving it here to monitor how it changes. The snag is
         # in Cursor._set_results_from_pipeline()
         assert cur.rowcount == 2