From 87279d5d037dd8e8d2ce7c1e2c7b65b370619e89 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 5 May 2020 00:19:38 +1200 Subject: 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. --- doc/src/usage.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1