Add ExplainState argument to pg_plan_query() and planner(). This allows extensions to have access to any data they've stored in the ExplainState during planning. Unfortunately, it won't help with EXPLAIN EXECUTE is used, but since that case is less common, this still seems like an improvement.
Since planner() has quite a few arguments now, also add some documentation of those arguments and the return value. Author: Robert Haas <[email protected]> Co-authored-by: Tom Lane <[email protected]> Reviewed-by: Andrei Lepikhov <[email protected]> Reviewed-by: Tom Lane <[email protected]> Discussion: http://postgr.es/m/ca+tgmoywkhu2hkr62toyzh-ktdenmdelw7gkoonjl-tnouq...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c83ac02ec7309edb7561eee93895c31a54b93d3d Modified Files -------------- contrib/pg_stat_statements/pg_stat_statements.c | 14 ++++++----- src/backend/commands/copyto.c | 2 +- src/backend/commands/createas.c | 2 +- src/backend/commands/explain.c | 2 +- src/backend/commands/matview.c | 2 +- src/backend/commands/portalcmds.c | 3 ++- src/backend/optimizer/plan/planner.c | 27 ++++++++++++++++++---- src/backend/tcop/postgres.c | 7 +++--- src/include/optimizer/optimizer.h | 5 +++- src/include/optimizer/planner.h | 8 +++++-- src/include/tcop/tcopprot.h | 4 +++- src/test/modules/delay_execution/delay_execution.c | 7 +++--- 12 files changed, 58 insertions(+), 25 deletions(-)
