Replace nested-BEGIN syntax for subtransactions with spec-compliant
Tom Lane <tgl@sss.pgh.pa.us>
Replace nested-BEGIN syntax for subtransactions with spec-compliant SAVEPOINT/RELEASE/ROLLBACK-TO syntax. (Alvaro) Cause COMMIT of a failed transaction to report ROLLBACK instead of COMMIT in its command tag. (Tom) Fix a few loose ends in the nested-transactions stuff.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xact.c | modified | +490 −120 |
| src/backend/executor/spi.c | modified | +8 −17 |
| src/backend/parser/gram.y | modified | +31 −5 |
| src/backend/parser/keywords.c | modified | +3 −1 |
| src/backend/storage/lmgr/lmgr.c | modified | +10 −13 |
| src/backend/tcop/postgres.c | modified | +10 −7 |
| src/backend/tcop/utility.c | modified | +50 −2 |
| src/bin/psql/tab-complete.c | modified | +12 −5 |
| src/include/access/xact.h | modified | +8 −3 |
| src/include/nodes/parsenodes.h | modified | +6 −3 |
| src/include/utils/errcodes.h | modified | +5 −1 |
| src/test/regress/expected/transactions.out | modified | +170 −53 |
| src/test/regress/sql/transactions.sql | modified | +126 −45 |