mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-24 18:03:43 +03:00
Note that the fast executemany functions don't respect rowcount
See issue #540
This commit is contained in:
parent
adf55babe8
commit
3b48918bef
|
@ -1178,6 +1178,9 @@ def execute_batch(cur, sql, argslist, page_size=100):
|
|||
fewer multi-statement commands, each one containing at most *page_size*
|
||||
statements, resulting in a reduced number of server roundtrips.
|
||||
|
||||
After the execution of the functtion the `cursor.rowcount` property will
|
||||
**not** contain a total result.
|
||||
|
||||
"""
|
||||
for page in _paginate(argslist, page_size=page_size):
|
||||
sqls = [cur.mogrify(sql, args) for args in page]
|
||||
|
@ -1212,6 +1215,9 @@ def execute_values(cur, sql, argslist, template=None, page_size=100):
|
|||
|
||||
.. __: https://www.postgresql.org/docs/current/static/queries-values.html
|
||||
|
||||
After the execution of the functtion the `cursor.rowcount` property will
|
||||
**not** contain a total result.
|
||||
|
||||
While :sql:`INSERT` is an obvious candidate for this function it is
|
||||
possible to use it with other statements, for example::
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user