]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix behavior of AND CHAIN outside of explicit transaction blocks
authorPeter Eisentraut <peter@eisentraut.org>
Sun, 8 Sep 2019 14:11:21 +0000 (16:11 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sun, 8 Sep 2019 14:23:03 +0000 (16:23 +0200)
commit862ef372d6b23629f93d4afc123ddd7d172501ac
treef856f03468eb358ef1d0d156b06ec04ab34c0290
parent0e777462121bd5b892c1621903d1953a49437290
Fix behavior of AND CHAIN outside of explicit transaction blocks

When using COMMIT AND CHAIN or ROLLBACK AND CHAIN not in an explicit
transaction block, the previous implementation would leave a
transaction block active in the ROLLBACK case but not the COMMIT case.
To fix for now, error out when using these commands not in an explicit
transaction block.  This restriction could be lifted if a sensible
definition and implementation is found.

Bug: #15977
Author: fn ln <emuser20140816@gmail.com>
Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
doc/src/sgml/ref/commit.sgml
doc/src/sgml/ref/rollback.sgml
src/backend/access/transam/xact.c
src/test/regress/expected/transactions.out
src/test/regress/sql/transactions.sql