Commit 52f3a9d6 authored by Peter Eisentraut's avatar Peter Eisentraut

Small refactoring

Put the "atomic" argument of ExecuteDoStmt() and ExecuteCallStmt() into
a variable instead of repeating the formula.
parent 66ee8513
......@@ -382,6 +382,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
{
Node *parsetree = pstmt->utilityStmt;
bool isTopLevel = (context == PROCESS_UTILITY_TOPLEVEL);
bool isAtomicContext = (context != PROCESS_UTILITY_TOPLEVEL || IsTransactionBlock());
ParseState *pstate;
check_xact_readonly(parsetree);
......@@ -514,8 +515,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
break;
case T_DoStmt:
ExecuteDoStmt((DoStmt *) parsetree,
(context != PROCESS_UTILITY_TOPLEVEL || IsTransactionBlock()));
ExecuteDoStmt((DoStmt *) parsetree, isAtomicContext);
break;
case T_CreateTableSpaceStmt:
......@@ -644,9 +644,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
break;
case T_CallStmt:
ExecuteCallStmt(castNode(CallStmt, parsetree), params,
(context != PROCESS_UTILITY_TOPLEVEL || IsTransactionBlock()),
dest);
ExecuteCallStmt(castNode(CallStmt, parsetree), params, isAtomicContext, dest);
break;
case T_ClusterStmt:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment