Nested Transactions in PostgreSQL Using SAVEPOINT, ROLLBACK TO, and RELEASE
PostgreSQL emulates nested transactions with savepoints. A savepoint records a position within an open transaction; it allows selective rolllback without aborting the outer transaction. Key commands: SAVEPOINT name: create a rollback marker ROLLBACK TO [SAVEPOINT] name: undo all work after that mar...