Mention CALL on stored procedures using transaction in autocommit

Close #1072 - I prefer to mention them where there is a discussion of
the feature rather than in the method or const values section.
This commit is contained in:
Daniele Varrazzo 2020-05-05 00:19:38 +12:00
parent accd1965bb
commit 87279d5d03

View File

@ -757,11 +757,14 @@ will result in an implicit rollback.
It is possible to set the connection in *autocommit* mode: this way all the It is possible to set the connection in *autocommit* mode: this way all the
commands executed will be immediately committed and no rollback is possible. A commands executed will be immediately committed and no rollback is possible. A
few commands (e.g. :sql:`CREATE DATABASE`, :sql:`VACUUM`...) require to be run few commands (e.g. :sql:`CREATE DATABASE`, :sql:`VACUUM`, :sql:`CALL` on
`stored procedures`__ using transaction control...) require to be run
outside any transaction: in order to be able to run these commands from outside any transaction: in order to be able to run these commands from
Psycopg, the connection must be in autocommit mode: you can use the Psycopg, the connection must be in autocommit mode: you can use the
`~connection.autocommit` property. `~connection.autocommit` property.
.. __: https://www.postgresql.org/docs/current/xproc.html
.. warning:: .. warning::
By default even a simple :sql:`SELECT` will start a transaction: in By default even a simple :sql:`SELECT` will start a transaction: in