Add extension_state member to PlannedStmt.

Robert Haas <rhaas@postgresql.org>

Commit: 4685977cc51c91dda0f76b1ef71ba02823a57a1e
Author: Robert Haas <rhaas@postgresql.org>
Date: 2025-10-08T13:07:49Z
Add extension_state member to PlannedStmt.

Extensions can stash data computed at plan time into this list using
planner_shutdown_hook (or perhaps other mechanisms) and then access
it from any code that has access to the PlannedStmt (such as explain
hooks), allowing for extensible debugging and instrumentation of
plans.

Reviewed-by: Andrei Lepikhov <lepihov@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: http://postgr.es/m/CA+TgmoYWKHU2hKr62Toyzh-kTDEnMDeLw7gkOOnjL-TnOUq0kQ@mail.gmail.com

Files

PathChange+/−
src/include/nodes/plannodes.h modified +9 −0

Discussion