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, ...@@ -382,6 +382,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
{ {
Node *parsetree = pstmt->utilityStmt; Node *parsetree = pstmt->utilityStmt;
bool isTopLevel = (context == PROCESS_UTILITY_TOPLEVEL); bool isTopLevel = (context == PROCESS_UTILITY_TOPLEVEL);
bool isAtomicContext = (context != PROCESS_UTILITY_TOPLEVEL || IsTransactionBlock());
ParseState *pstate; ParseState *pstate;
check_xact_readonly(parsetree); check_xact_readonly(parsetree);
...@@ -514,8 +515,7 @@ standard_ProcessUtility(PlannedStmt *pstmt, ...@@ -514,8 +515,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
break; break;
case T_DoStmt: case T_DoStmt:
ExecuteDoStmt((DoStmt *) parsetree, ExecuteDoStmt((DoStmt *) parsetree, isAtomicContext);
(context != PROCESS_UTILITY_TOPLEVEL || IsTransactionBlock()));
break; break;
case T_CreateTableSpaceStmt: case T_CreateTableSpaceStmt:
...@@ -644,9 +644,7 @@ standard_ProcessUtility(PlannedStmt *pstmt, ...@@ -644,9 +644,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
break; break;
case T_CallStmt: case T_CallStmt:
ExecuteCallStmt(castNode(CallStmt, parsetree), params, ExecuteCallStmt(castNode(CallStmt, parsetree), params, isAtomicContext, dest);
(context != PROCESS_UTILITY_TOPLEVEL || IsTransactionBlock()),
dest);
break; break;
case T_ClusterStmt: 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