On Wed, Jan 29, 2014 at 2:21 PM, Andreas Karlsson <andr...@proxel.se> wrote: > On 01/28/2014 09:39 PM, Tom Lane wrote: >> >> I'm for doing the measurement in ExplainOneQuery() and not printing >> anything in code paths that don't go through there. > > Reading the discussion here and realizing that my last patch was wrong I am > now in agreement with this. I have attached a patch which no longer tries to > measure planning time for prepared statements.
Cool. I propose adding one parameter rather than two to ExplainOnePlan() and making it of type instr_time * rather than passing an instr_time and a bool. If you don't want to include the planning time, pass NULL; if you do, pass a pointer to the instr_time you want to print. I think that would come out slightly neater than what you have here. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers