mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Make better use of ParseState in ProcessUtility
Pass ParseState into the functions called from standard_ProcessUtility() instead passing the query string and query environment separately. No functionality change, but it makes the notation consistent. We had already started moving things into that direction piece by piece, and this completes it. Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/6e7aa4a1-be6a-1a75-b1f9-83a678e5184a@2ndquadrant.com
This commit is contained in:
@ -139,9 +139,8 @@ static void escape_yaml(StringInfo buf, const char *str);
|
||||
* execute an EXPLAIN command
|
||||
*/
|
||||
void
|
||||
ExplainQuery(ParseState *pstate, ExplainStmt *stmt, const char *queryString,
|
||||
ParamListInfo params, QueryEnvironment *queryEnv,
|
||||
DestReceiver *dest)
|
||||
ExplainQuery(ParseState *pstate, ExplainStmt *stmt,
|
||||
ParamListInfo params, DestReceiver *dest)
|
||||
{
|
||||
ExplainState *es = NewExplainState();
|
||||
TupOutputState *tstate;
|
||||
@ -254,7 +253,7 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt, const char *queryString,
|
||||
{
|
||||
ExplainOneQuery(lfirst_node(Query, l),
|
||||
CURSOR_OPT_PARALLEL_OK, NULL, es,
|
||||
queryString, params, queryEnv);
|
||||
pstate->p_sourcetext, params, pstate->p_queryEnv);
|
||||
|
||||
/* Separate plans with an appropriate separator */
|
||||
if (lnext(rewritten, l) != NULL)
|
||||
|
Reference in New Issue
Block a user