> I don't quite understand why do we need to differentiate between
> PLAN_CACHE_STATUS_GENERIC_PLAN_BUILD and
> PLAN_CACHE_STATUS_GENERIC_PLAN_REUSE?
> We could simply keep PLAN_CACHE_STATUS_GENERIC_PLAN_REUSE.
> I don't think users would see much of a difference in either pg_stat_statements or EXPLAIN.
If we removed GENERIC_PLAN_BUILD, I suppose we can simply rely on
CPlan != NULL && cplan->status != PLAN_CACHE_STATUS_CUSTOM_PLAN
to determine that we have a generic plan. However, I rather keep the status(s)
defined this way for clarity.
> As for EXPLAIN, maybe we should include this in VERBOSE mode?
This could be a fast follow-up patch as there appears to be support
for this idea.
--
Sami