Re: [HACKERS] compile warning in CVS HEAD

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [HACKERS] compile warning in CVS HEAD
Дата
Msg-id 405A479E.1010102@dunslane.net
обсуждение исходный текст
Ответ на Re: [HACKERS] compile warning in CVS HEAD  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>
>
>>Patch attached. Also adds a malloc() check that Neil wanted.
>>
>>
>
>Er, what on God's green earth is elog.c doing malloc'ing stuff at all?
>This should be a palloc in the ErrorContext; that's what it's for.
>As is, this code is guaranteed to fail under out-of-memory conditions.
>
>
>

Well, it's a one-off allocation into a static variable, if that makes
any difference. If not, I accept the rebuke :-)

I first published the ancestor of this code many months ago, and nobody
has objected until now. But there is always room for improvement I
guess, including in my own knowledge. I'll be happy to change it if need be.

cheers

andrew


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] compile warning in CVS HEAD
Следующее
От: Robert Treat
Дата:
Сообщение: FAQ updates