fix explain plan pbe core

This commit is contained in:
ganyang 2023-03-03 11:19:50 +08:00
parent 2f380bcdb0
commit 66a0e4f347
1 changed files with 4 additions and 0 deletions

View File

@ -1727,6 +1727,10 @@ static void PortalRunUtility(Portal portal, Node* utilityStmt, bool isTopLevel,
#endif /* PGXC */
completionTag);
if (proutility_cxt.parse_tree != NULL && nodeTag(proutility_cxt.parse_tree) == T_ExplainStmt && ((ExplainStmt*)proutility_cxt.parse_tree)->planinfo != NULL) {
((ExplainStmt*)utilityStmt)->planinfo = ((ExplainStmt*)proutility_cxt.parse_tree)->planinfo;
}
/* Some utility statements may change context on us */
MemoryContextSwitchTo(PortalGetHeapMemory(portal));