]> 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:22:51 +0000 (16:22 +0200)
commitb6d72ddd5fbf3f6eb79597ab0c8ec3aaa7c16805
tree17de93437ec092f2dbf3708a3f5bad38caa3627b
parent422910423b6cba6abc3790b8f20854c9e78e04a4
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