diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2020-05-05 00:19:38 +1200 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2020-05-05 00:19:38 +1200 |
commit | 87279d5d037dd8e8d2ce7c1e2c7b65b370619e89 (patch) | |
tree | f20ba7e1d340e4391b54618899720bff49eea4c8 | |
parent | accd1965bb8c3646149adaa8c93a50ae01fbccbc (diff) | |
download | psycopg2-87279d5d037dd8e8d2ce7c1e2c7b65b370619e89.tar.gz |
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.
-rw-r--r-- | doc/src/usage.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/src/usage.rst b/doc/src/usage.rst index 48744ef..1356328 100644 --- a/doc/src/usage.rst +++ b/doc/src/usage.rst @@ -757,11 +757,14 @@ will result in an implicit rollback. 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 -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 Psycopg, the connection must be in autocommit mode: you can use the `~connection.autocommit` property. +.. __: https://www.postgresql.org/docs/current/xproc.html + .. warning:: By default even a simple :sql:`SELECT` will start a transaction: in |