From cc813fc2b8d9293bbd4d0e0d6a6f3b9cf02fe32f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 27 Jul 2004 05:11:48 +0000 Subject: 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. --- src/include/access/xact.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/include/access/xact.h') diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 458b3012ad..7bf92b0153 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.66 2004/07/21 22:31:25 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.67 2004/07/27 05:11:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -16,6 +16,7 @@ #include "access/xlog.h" #include "storage/relfilenode.h" +#include "nodes/pg_list.h" #include "utils/nabstime.h" @@ -101,12 +102,16 @@ extern void StartTransactionCommand(void); extern void CommitTransactionCommand(void); extern void AbortCurrentTransaction(void); extern void BeginTransactionBlock(void); -extern void EndTransactionBlock(void); +extern bool EndTransactionBlock(void); +extern void UserAbortTransactionBlock(void); +extern void ReleaseSavepoint(List *options); +extern void DefineSavepoint(char *name); +extern void RollbackToSavepoint(List *options); +extern void RollbackAndReleaseSavepoint(List *options); extern bool IsSubTransaction(void); extern bool IsTransactionBlock(void); extern bool IsTransactionOrTransactionBlock(void); extern char TransactionBlockStatusCode(void); -extern void UserAbortTransactionBlock(void); extern void AbortOutOfAnyTransaction(void); extern void PreventTransactionChain(void *stmtNode, const char *stmtType); extern void RequireTransactionChain(void *stmtNode, const char *stmtType); -- cgit v1.2.1