doc: clarify the useful features of procedures
authorBruce Momjian <[email protected]>
Mon, 31 Aug 2020 17:20:04 +0000 (13:20 -0400)
committerBruce Momjian <[email protected]>
Mon, 31 Aug 2020 17:20:04 +0000 (13:20 -0400)
This was not clearly documented when procedures were added in PG 11.

Reported-by: Robin Abbi
Discussion: https://postgr.es/m/CAGmg_NX327KKVuJmbWZD=pGutYFxzZjX1rU+3ji8UuX=8ONn9Q@mail.gmail.com

Back-through: 11

doc/src/sgml/xfunc.sgml

index 6de464c654577e3f2bd27cc5fea33c6dcf64b987..732d93552127e8ee8dd494a726d86f45ebf435b6 100644 (file)
     A procedure is a database object similar to a function.  The difference is
     that a procedure does not return a value, so there is no return type
     declaration.  While a function is called as part of a query or DML
-    command, a procedure is called explicitly using
-    the <xref linkend="sql-call"/> statement.
+    command, a procedure is called in isolation using
+    the <xref linkend="sql-call"/> command.  If the CALL command is not
+    part of an explicit transaction, a procedure in many server-side
+    languages can commit, rollback, and begin new transactions during
+    its execution, which is not possible in functions.
    </para>
 
    <para>