define a new savepoint within the current transaction NAME SAVEPOINT - define a new savepoint within the current...release a previously defined savepoint NAME RELEASE_SAVEPOINT - release a previously defined savepoint SYNOPSIS RELEASE [ SAVEPO...roll back to a savepoint NAME ROLLBACK_TO_SAVEPOINT - roll back to a savepoint SYNOPSIS ROLLBACK [ WORK | TRANSACT......of the transaction is not affected. To nest transactions within a transaction block, use savepoints (see SAVEPOINT (7)). For reasons of backwards compatibility, the commas betwe…...LLBACK TRANSACTION is a PostgreSQL extension. SEE ALSO BEGIN (7), COMMIT (7), ROLLBACK TO SAVEPOINT ( ROLLBACK_TO_SAVEPOINT (7))...of SET TRANSACTION ( SET_TRANSACTION (7)). SEE ALSO BEGIN (7), COMMIT (7), ROLLBACK (7), SAVEPOINT (7), SET TRANSACTION ( SET_TRANSACTION (7))...l available cursors by querying the pg_cursors system view. If a cursor is closed after a savepoint which is later rolled back, the CLOSE is not rolled back; that is, the cursor…...will take effect. The effects of SET or SET LOCAL are also canceled by rolling back to a savepoint that is earlier than the command. If SET LOCAL is used within a function that …...stock count of the existing item. To do this without failing the entire transaction, use savepoints: BEGIN; -- other operations SAVEPOINT sp1; INSERT INTO wines VALUES('Chateau …retrieve rows from a table or view NAME SELECT, TABLE, WITH - retrieve rows from a table or view SYNOPSIS [ WITH [ RECURSIVE ] with_query [, ...] ] SELECT [ ALL | DISTINCT [ ON ( e…