Re: [FEATURE PATCH] pg_stat_statements with plans (v02) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [FEATURE PATCH] pg_stat_statements with plans (v02)
Date
Msg-id 18093.1534733738@sss.pgh.pa.us
Whole thread Raw
In response to Re: [FEATURE PATCH] pg_stat_statements with plans (v02)  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: [FEATURE PATCH] pg_stat_statements with plans (v02)
List pgsql-hackers
[ off topic for this patch, but as long as you mentioned switching
to C99 ]

Thomas Munro <thomas.munro@enterprisedb.com> writes:
> + for(int j = 0; j < numPlans; j++)
> Can't declare a new variable here in C89.

As previously noted, that seems like a nice thing to allow ...

> + pgssPlan *planArray[numPlans];
> Can't use variable length arrays in C89.

... but I'm less excited about this one.  Seems like a great opportunity
for unexpected stack overflows, and thence at least the chance for
DOS-causing security attacks.  Can we prevent that from being allowed,
if we start using -std=c99?

            regards, tom lane


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: ALTER TABLE on system catalogs
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] GnuTLS support