diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-02-16 20:44:15 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-03-16 13:18:06 -0400 |
commit | 04700b685f31508036456bea4d92533e5ceee9d6 (patch) | |
tree | f3fc6cddf9f5764decbaa76c5c5423fdcd873a36 /src/backend/access/transam/xact.c | |
parent | 8d47a908626bf0800dc6a01f4ff2b2bc15cdaf86 (diff) | |
download | postgresql-04700b685f31508036456bea4d92533e5ceee9d6.tar.gz postgresql-04700b685f31508036456bea4d92533e5ceee9d6.zip |
Rename TransactionChain functions
We call this thing a "transaction block" everywhere except in a few
functions, where it is mysteriously called a "transaction chain". In
the SQL standard, a transaction chain is something different. So rename
these functions to match the common terminology.
Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r-- | src/backend/access/transam/xact.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index df7c8ebea1e..49d4decc710 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -310,7 +310,7 @@ static void CallSubXactCallbacks(SubXactEvent event, SubTransactionId mySubid, SubTransactionId parentSubid); static void CleanupTransaction(void); -static void CheckTransactionChain(bool isTopLevel, bool throwError, +static void CheckTransactionBlock(bool isTopLevel, bool throwError, const char *stmtType); static void CommitTransaction(void); static TransactionId RecordTransactionAbort(bool isSubXact); @@ -3134,7 +3134,7 @@ AbortCurrentTransaction(void) } /* - * PreventTransactionChain + * PreventInTransactionBlock * * This routine is to be called by statements that must not run inside * a transaction block, typically because they have non-rollback-able @@ -3151,7 +3151,7 @@ AbortCurrentTransaction(void) * stmtType: statement type name, for error messages. */ void -PreventTransactionChain(bool isTopLevel, const char *stmtType) +PreventInTransactionBlock(bool isTopLevel, const char *stmtType) { /* * xact block already started? @@ -3190,8 +3190,8 @@ PreventTransactionChain(bool isTopLevel, const char *stmtType) } /* - * WarnNoTranactionChain - * RequireTransactionChain + * WarnNoTranactionBlock + * RequireTransactionBlock * * These two functions allow for warnings or errors if a command is executed * outside of a transaction block. This is useful for commands that have no @@ -3204,29 +3204,29 @@ PreventTransactionChain(bool isTopLevel, const char *stmtType) * If we appear to be running inside a user-defined function, we do not * issue anything, since the function could issue more commands that make * use of the current statement's results. Likewise subtransactions. - * Thus these are inverses for PreventTransactionChain. + * Thus these are inverses for PreventInTransactionBlock. * * isTopLevel: passed down from ProcessUtility to determine whether we are * inside a function. * stmtType: statement type name, for warning or error messages. */ void -WarnNoTransactionChain(bool isTopLevel, const char *stmtType) +WarnNoTransactionBlock(bool isTopLevel, const char *stmtType) { - CheckTransactionChain(isTopLevel, false, stmtType); + CheckTransactionBlock(isTopLevel, false, stmtType); } void -RequireTransactionChain(bool isTopLevel, const char *stmtType) +RequireTransactionBlock(bool isTopLevel, const char *stmtType) { - CheckTransactionChain(isTopLevel, true, stmtType); + CheckTransactionBlock(isTopLevel, true, stmtType); } /* * This is the implementation of the above two. */ static void -CheckTransactionChain(bool isTopLevel, bool throwError, const char *stmtType) +CheckTransactionBlock(bool isTopLevel, bool throwError, const char *stmtType) { /* * xact block already started? @@ -3255,7 +3255,7 @@ CheckTransactionChain(bool isTopLevel, bool throwError, const char *stmtType) } /* - * IsInTransactionChain + * IsInTransactionBlock * * This routine is for statements that need to behave differently inside * a transaction block than when running as single commands. ANALYZE is @@ -3265,10 +3265,10 @@ CheckTransactionChain(bool isTopLevel, bool throwError, const char *stmtType) * inside a function. */ bool -IsInTransactionChain(bool isTopLevel) +IsInTransactionBlock(bool isTopLevel) { /* - * Return true on same conditions that would make PreventTransactionChain + * Return true on same conditions that would make PreventInTransactionBlock * error out */ if (IsTransactionBlock()) |