Re: Less than ideal error reporting in pg_stat_statements

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Less than ideal error reporting in pg_stat_statements
Дата
Msg-id CAM3SWZSJevoEvONW4M0_++GUB2z2qs3OFxMrxmTFXoYRHmZ=uw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Less than ideal error reporting in pg_stat_statements  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Oct 2, 2015 at 2:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I'm not too impressed with this bit:
>
>         /* Allocate buffer; beware that off_t might be wider than size_t */
> -       if (stat.st_size <= MaxAllocSize)
> +       if (stat.st_size <= SIZE_MAX)
>                 buf = (char *) malloc(stat.st_size);
>
> because there are no, zero, not one uses of SIZE_MAX in our code today,
> and I do not see such a symbol required by the POSIX v2 spec either.

See my remarks just now. This can easily be fixed.


-- 
Peter Geoghegan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Less than ideal error reporting in pg_stat_statements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Less than ideal error reporting in pg_stat_statements