summaryrefslogtreecommitdiff
path: root/src/backend/commands/prepare.c
diff options
context:
space:
mode:
authorRobert Haas2025-03-18 12:41:12 +0000
committerRobert Haas2025-03-18 12:41:12 +0000
commitc65bc2e1d14a2d4daed7c1921ac518f2c5ac3d17 (patch)
treeffb12e651e2d3603d3f11aef0449d90bd82ac087 /src/backend/commands/prepare.c
parent9d6db8bec19413cd0167f1e59d1af005a997bd3e (diff)
Make it possible for loadable modules to add EXPLAIN options.
Modules can use RegisterExtensionExplainOption to register new EXPLAIN options, and GetExplainExtensionId, GetExplainExtensionState, and SetExplainExtensionState to store related state inside the ExplainState object. Since this substantially increases the amount of code that needs to handle ExplainState-related tasks, move a few bits of existing code to a new file explain_state.c and add the rest of this infrastructure there. See the comments at the top of explain_state.c for further explanation of how this mechanism works. This does not yet provide a way for such such options to do anything useful. The intention is that we'll add hooks for that purpose in a separate commit. Discussion: http://postgr.es/m/CA+TgmoYSzg58hPuBmei46o8D3SKX+SZoO4K_aGQGwiRzvRApLg@mail.gmail.com Reviewed-by: Srinath Reddy <[email protected]> Reviewed-by: Andrei Lepikhov <[email protected]> Reviewed-by: Tom Lane <[email protected]> Reviewed-by: Sami Imseih <[email protected]>
Diffstat (limited to 'src/backend/commands/prepare.c')
-rw-r--r--src/backend/commands/prepare.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c
index 4d68d4d25c7..bf7d2b2309f 100644
--- a/src/backend/commands/prepare.c
+++ b/src/backend/commands/prepare.c
@@ -21,7 +21,9 @@
#include "access/xact.h"
#include "catalog/pg_type.h"
#include "commands/createas.h"
+#include "commands/explain.h"
#include "commands/explain_format.h"
+#include "commands/explain_state.h"
#include "commands/prepare.h"
#include "funcapi.h"
#include "nodes/nodeFuncs.h"