Re: [FEATURE PATCH] pg_stat_statements with plans (v02)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [FEATURE PATCH] pg_stat_statements with plans (v02)
Дата
Msg-id 18093.1534733738@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [FEATURE PATCH] pg_stat_statements with plans (v02)  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: [FEATURE PATCH] pg_stat_statements with plans (v02)
Список 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 по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: ALTER TABLE on system catalogs
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] GnuTLS support