]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add a guc_check_handler to the EXPLAIN extension mechanism.
authorRobert Haas <rhaas@postgresql.org>
Mon, 6 Apr 2026 16:29:59 +0000 (12:29 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 6 Apr 2026 16:31:47 +0000 (12:31 -0400)
commit0442f1c9eff673849664d8ef71c202ad076e72e9
treef6204c743538baa4c0d4589071f222dfedd0b128
parente3481edfd1b6b0a64fef8f43cfa3b48e94c01682
Add a guc_check_handler to the EXPLAIN extension mechanism.

It would be useful to be able to tell auto_explain to set a custom
EXPLAIN option, but it would be bad if it tried to do so and the
option name or value wasn't valid, because then every query would fail
with a complaint about the EXPLAIN option. So add a guc_check_handler
that auto_explain will be able to use to only try to set option
name/value/type combinations that have been determined to be legal,
and to emit useful messages about ones that aren't.

Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewed-by: Lukas Fittl <lukas@fittl.com>
Discussion: http://postgr.es/m/CA+Tgmob-0W8306mvrJX5Urtqt1AAasu8pi4yLrZ1XfwZU-Uj1w@mail.gmail.com
contrib/pg_overexplain/pg_overexplain.c
contrib/pg_plan_advice/pg_plan_advice.c
src/backend/commands/explain_state.c
src/include/commands/explain_state.h