On Sat, Apr 7, 2018 at 1:03 AM, Julian Markwort
<julian.markw...@uni-muenster.de> wrote:
> I've created a draft patch that provides access to plans in a view called 
> pg_stat_statements_plans.
> There is no column that indicates whether the plan is "good" or "bad", 
> because that is evident from the execution time of both plans and because 
> that would require some kind of plan_type for all plans that might be stored 
> in future versions.
>
> Please take it for a spin and tell me, whether the layout and handling of the 
> view make sense to you.

I realise this is probably WIP, but for what it's worth here's some
feedback from my patch testing robot:

+ +INFINITY,

That ^ is from C99 math.h, and so we don't currently expect compilers
to have it (until such time as we decide to pull the trigger and
switch to C99, as discussed in a nearby thread):

  contrib/pg_stat_statements/pg_stat_statements.c(482): error C2065:
'INFINITY' : undeclared identifier
[C:\projects\postgresql\pg_stat_statements.vcxproj]
5826

Maybe get_float8_infinity()?

+ for(int j = 0; j < numPlans; j++)

Can't declare a new variable here in C89.

+ pgssPlan *planArray[numPlans];

Can't use variable length arrays in C89.

-- 
Thomas Munro
http://www.enterprisedb.com

Reply via email to