[#127944191] Fix compiler warning in gp_dump_query_oids

We just need to pass the query tree, we don't need source sql text and
other arguments, so change to QueryRewrite here. Previously an implicit
cast was causing a compiler warning. Also, the method pg_analyze_and_rewrite
is overkill, and in fact calls QueryRewrite.
上级 c85f858e
......@@ -108,8 +108,8 @@ gp_dump_query_oids(PG_FUNCTION_ARGS)
Query *query = (Query *) lfirst(plc);
if (CMD_UTILITY == query->commandType && T_ExplainStmt == query->utilityStmt->type)
{
Node *queryExplain = ((ExplainStmt *)query->utilityStmt)->query;
List *queryTree = pg_analyze_and_rewrite(queryExplain, sqlText, NULL, 0);
Query *queryExplain = ((ExplainStmt *)query->utilityStmt)->query;
List *queryTree = QueryRewrite(queryExplain);
Assert(1 == list_length(queryTree));
query = (Query *) lfirst(list_head(queryTree));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册