Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52f3a9d

Browse files
committed
Small refactoring
Put the "atomic" argument of ExecuteDoStmt() and ExecuteCallStmt() intoa variable instead of repeating the formula.
1 parent66ee851 commit52f3a9d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎src/backend/tcop/utility.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
382382
{
383383
Node*parsetree=pstmt->utilityStmt;
384384
boolisTopLevel= (context==PROCESS_UTILITY_TOPLEVEL);
385+
boolisAtomicContext= (context!=PROCESS_UTILITY_TOPLEVEL||IsTransactionBlock());
385386
ParseState*pstate;
386387

387388
check_xact_readonly(parsetree);
@@ -514,8 +515,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
514515
break;
515516

516517
caseT_DoStmt:
517-
ExecuteDoStmt((DoStmt*)parsetree,
518-
(context!=PROCESS_UTILITY_TOPLEVEL||IsTransactionBlock()));
518+
ExecuteDoStmt((DoStmt*)parsetree,isAtomicContext);
519519
break;
520520

521521
caseT_CreateTableSpaceStmt:
@@ -644,9 +644,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
644644
break;
645645

646646
caseT_CallStmt:
647-
ExecuteCallStmt(castNode(CallStmt,parsetree),params,
648-
(context!=PROCESS_UTILITY_TOPLEVEL||IsTransactionBlock()),
649-
dest);
647+
ExecuteCallStmt(castNode(CallStmt,parsetree),params,isAtomicContext,dest);
650648
break;
651649

652650
caseT_ClusterStmt:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp