File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 385385statements created from pre-existing identifiers, ``statement_from_id``, must
386386be explicitly closed if the statement is to be discarded.
387387
388- Statement objects are one-time objects. Once closed, execution will cause a
389- database error.
388+ Statement objects are one-time objects. Once closed, they can no longer be used.
389+
390390
391391Prepared Statement Interface Points
392392-----------------------------------
445445 return the row count returned by the statement as an integer.
446446
447447 .. note::
448- DML that returns rows will not return a row count.
448+ DML that returns row data, RETURNING, will * not* return a row count.
449449
450450 The result set created by the statement determines what is actually returned.
451451 Naturally, a statement used with ``first()`` should be crafted with these
689689 >>> for rowset in ps.chunks():
690690 ... sys.stdout.buffer.writelines(rowset)
691691 ...
692- <Lots of Data >
692+ <lots of data >
693693
694694``COPY FROM STDIN`` commands are supported via
695695`postgresql.api.PreparedStatement.load`. Each invocation to ``load``
716716 >>> copyin = dst.prepare('COPY atable FROM STDIN')
717717 >>> copyin.load(copyout.chunks())
718718
719+ Specifically, each chunk of row data produced by ``chunks()`` will be written in
720+ full by ``load()`` before getting another chunk to write.
721+
719722
720723Cursors
721724=======
You can’t perform that action at this time.
0 commit comments