mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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>
This commit is contained in:
@ -77,7 +77,8 @@ COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
|
||||
|
||||
<para>
|
||||
Issuing <command>COMMIT</command> when not inside a transaction does
|
||||
no harm, but it will provoke a warning message.
|
||||
no harm, but it will provoke a warning message. <command>COMMIT AND
|
||||
CHAIN</command> when not inside a transaction is an error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -76,7 +76,8 @@ ROLLBACK [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
|
||||
|
||||
<para>
|
||||
Issuing <command>ROLLBACK</command> outside of a transaction
|
||||
block emits a warning and otherwise has no effect.
|
||||
block emits a warning and otherwise has no effect. <command>ROLLBACK AND
|
||||
CHAIN</command> outside of a transaction block is an error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
Reference in New Issue
Block a user