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

Commit4d41b2e

Browse files
committed
Add QueryEnvironment to ExplainOneQuery_hook's parameter list.
This should have been done in commit18ce3a4, which added that parameterto ExplainOneQuery, but it was overlooked. This makes it impossible fora user of the hook to pass the queryEnv down to ExplainOnePlan.It's too late to change this API in v10, I suppose, but fortunatelypassing NULL to ExplainOnePlan will work in nearly all interestingcases in v10. That might not be true forever, so we'd better fix it.Tatsuro Yamada, reviewed by Thomas MunroDiscussion:https://postgr.es/m/890e8dd9-c1c7-a422-6892-874f5eaee048@lab.ntt.co.jp
1 parent9ff4f75 commit4d41b2e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎src/backend/commands/explain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ ExplainOneQuery(Query *query, int cursorOptions,
351351
/* if an advisor plugin is present, let it manage things */
352352
if (ExplainOneQuery_hook)
353353
(*ExplainOneQuery_hook) (query,cursorOptions,into,es,
354-
queryString,params);
354+
queryString,params,queryEnv);
355355
else
356356
{
357357
PlannedStmt*plan;

‎src/include/commands/explain.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ typedef void (*ExplainOneQuery_hook_type) (Query *query,
5353
IntoClause*into,
5454
ExplainState*es,
5555
constchar*queryString,
56-
ParamListInfoparams);
56+
ParamListInfoparams,
57+
QueryEnvironment*queryEnv);
5758
externPGDLLIMPORTExplainOneQuery_hook_typeExplainOneQuery_hook;
5859

5960
/* Hook for plugins to get control in explain_get_index_name() */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp