abort the current transaction NAME ROLLBACK - abort the current transaction SYNOPSIS ROLLBACK [ WORK | TRANSACTION ] [ AND [ NO ] CHA...cancel a transaction that was earlier prepared for two-phase commit NAME ROLLBACK_PREPARED - cancel a transaction that was earlier prepared for two-phase commit SYNOPSIS R...roll back to a savepoint NAME ROLLBACK_TO_SAVEPOINT - roll back to a savepoint SYNOPSIS ROLLBACK [ WORK | TRANSACTION ] TO [ SAV......hey will be inaccessible until newer identically-named savepoints are released. NOTES Use ROLLBACK TO to rollback to a savepoint. Use RELEASE SAVEPOINT to destroy a savepoint, k…...sible to release a savepoint when the transaction is in an aborted state; to do that, use ROLLBACK TO SAVEPOINT ( ROLLBACK_TO_SAVEPOINT (7)). If multiple savepoints have the sam…...nce prepared, a transaction can later be committed or rolled back with COMMIT PREPARED or ROLLBACK PREPARED , respectively. Those commands can be issued from any session, not on…...action to be discarded. This command is identical in behavior to the standard SQL command ROLLBACK , and is present only for historical reasons. PARAMETERS WORK TRANSACTION Opti…...fter a BEGIN command will be executed in a single transaction until an explicit COMMIT or ROLLBACK is given. By default (without BEGIN ), PostgreSQL executes transactions in “au…...CTION (7))) as the just finished one. Otherwise, no new transaction is started. NOTES Use ROLLBACK to abort a transaction. Issuing END when not inside a transaction does no harm…...CTION (7))) as the just finished one. Otherwise, no new transaction is started. NOTES Use ROLLBACK (7) to abort a transaction. Issuing COMMIT when not inside a transaction does …...ose systems is not standardized. SEE ALSO PREPARE TRANSACTION ( PREPARE_TRANSACTION (7)), ROLLBACK PREPARED ( ROLLBACK_PREPARED (7))...n-holdable open cursor is implicitly closed when a transaction is terminated by COMMIT or ROLLBACK . A holdable cursor is implicitly closed if the transaction that created it ab…...bility section of SET TRANSACTION ( SET_TRANSACTION (7)). SEE ALSO BEGIN (7), COMMIT (7), ROLLBACK (7), SAVEPOINT (7), SET TRANSACTION ( SET_TRANSACTION (7))...actional behavior of RESET is the same as SET : its effects will be undone by transaction rollback. PARAMETERS configuration_parameter Name of a settable run-time parameter. Ava…...QL reports an error if LOCK is used outside a transaction block. Use BEGIN and COMMIT (or ROLLBACK ) to define a transaction block. LOCK TABLE only deals with table-level locks,…...DEFINER procedure cannot execute transaction control statements (for example, COMMIT and ROLLBACK , depending on the language). configuration_parameter value The SET clause caus…...Specifies that the command takes effect for only the current transaction. After COMMIT or ROLLBACK , the session-level setting takes effect again. Issuing this outside of a tran…...an error if such a command is used outside a transaction block. Use BEGIN and COMMIT (or ROLLBACK ) to define a transaction block. If WITH HOLD is specified and the transaction …...ume the above fails because of a unique key violation, -- so now we issue these commands: ROLLBACK TO sp1; UPDATE wines SET stock = stock + 24 WHERE winename = 'Chateau Lafite 2…...hout letting the command affect your data, use this approach: BEGIN; EXPLAIN ANALYZE ...; ROLLBACK; PARAMETERS ANALYZE Carry out the command and show actual run times and other …