On 01/13/2014 09:48 PM, Robert Haas wrote:
> What I'm saying is that if EXPLAIN reports something that's labelled
> "Planning Time", it should *be* the planning time, and not anything
> else. When we retrieve a plan from cache, it would be sensible not to
> report the planning time at all, and IMHO it would also be sensible to
> report the time it actually took to plan whenever we originally did
> it. But reporting a value that is not the planning time and calling
> it the planning time does not seem like a good idea to me.
Here is a patch which only prints when "Planning time" when a prepared
statment actually planned a query. I do not really like how I check for
if it was replanned, but I tried to avoid making changes in plancache.c.
Does this idea look ok?
--
Andreas Karlsson