mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Small refactoring
Put the "atomic" argument of ExecuteDoStmt() and ExecuteCallStmt() into a variable instead of repeating the formula.
This commit is contained in:
@ -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,
|
|||||||
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,
|
|||||||
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:
|
||||||
|
Reference in New Issue
Block a user