diff --git a/doc/src/extras.rst b/doc/src/extras.rst index d7600bbf..ded77fe4 100644 --- a/doc/src/extras.rst +++ b/doc/src/extras.rst @@ -986,6 +986,12 @@ parameters. By reducing the number of server roundtrips the performance can be .. autofunction:: execute_batch + >>> nums = [[1],[5],[10]] + >>> execute_batch(cur, "INSERT INTO test (num) VALUES (%s)", nums) + + >>> tuples = ((123,"foo"), (42,"bar"), (23,"baz")) + >>> execute_batch(cur, "INSERT INTO test (num, data) VALUES (%s, %s)", tuples) + .. versionadded:: 2.7 .. note::