mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
Invent GENERIC_PLAN option for EXPLAIN.
This provides a very simple way to see the generic plan for a parameterized query. Without this, it's necessary to define a prepared statement and temporarily change plan_cache_mode, which is a bit tedious. One thing that's a bit of a hack perhaps is that we disable execution-time partition pruning when the GENERIC_PLAN option is given. That's because the pruning code may attempt to fetch the value of one of the parameters, which would fail. Laurenz Albe, reviewed by Julien Rouhaud, Christoph Berg, Michel Pelletier, Jim Jones, and myself Discussion: https://postgr.es/m/0a29b954b10b57f0d135fe12aa0909bd41883eb0.camel@cybertec.at
This commit is contained in:
@@ -46,6 +46,7 @@ typedef struct ExplainState
|
||||
bool timing; /* print detailed node timing */
|
||||
bool summary; /* print total planning and execution timing */
|
||||
bool settings; /* print modified settings */
|
||||
bool generic; /* generate a generic plan */
|
||||
ExplainFormat format; /* output format */
|
||||
/* state for output formatting --- not reset for each new plan tree */
|
||||
int indent; /* current indentation level */
|
||||
|
Reference in New Issue
Block a user