summaryrefslogtreecommitdiff
path: root/src/include/commands
diff options
context:
space:
mode:
authorRobert Haas2025-03-20 17:47:55 +0000
committerRobert Haas2025-03-20 17:47:55 +0000
commit50ba65e73325cf55fedb3e1f14673d816726923b (patch)
tree069cef53df918c130aaa8c9fad5b6f1473c76475 /src/include/commands
parentaf0d4901c1c39b3e3425522834708e0992592bb8 (diff)
Add an additional hook for EXPLAIN option validation.
Commit c65bc2e1d14a2d4daed7c1921ac518f2c5ac3d17 made it possible for loadable modules to add EXPLAIN options. Normally, any necessary validation can be performed by the hook function passed to RegisterExtensionExplainOption, but if a loadable module wants to sanity check options against each other, that needs to be done after the entire options list has been processed. So, add an additional hook for that purpose. Author: Sami Imseih <[email protected]> Reviewed-by: Robert Haas <[email protected]> Reviewed-by: Andrei Lepikhov <[email protected]> Reviewed-by: Tom Lane <[email protected]> Discussion: http://postgr.es/m/CAA5RZ0vOcJF91O2e5AQN+V6guMNLMhJx83dxALf-iUZ-hLGO_Q@mail.gmail.com
Diffstat (limited to 'src/include/commands')
-rw-r--r--src/include/commands/explain_state.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/commands/explain_state.h b/src/include/commands/explain_state.h
index 925097492b9..32728f5d1a1 100644
--- a/src/include/commands/explain_state.h
+++ b/src/include/commands/explain_state.h
@@ -78,6 +78,11 @@ typedef struct ExplainState
typedef void (*ExplainOptionHandler) (ExplainState *, DefElem *, ParseState *);
+/* Hook to perform additional EXPLAIN options validation */
+typedef void (*explain_validate_options_hook_type) (struct ExplainState *es, List *options,
+ ParseState *pstate);
+extern PGDLLIMPORT explain_validate_options_hook_type explain_validate_options_hook;
+
extern ExplainState *NewExplainState(void);
extern void ParseExplainOptionList(ExplainState *es, List *options,
ParseState *pstate);