| От | Tom Lane |
|---|---|
| Тема | Re: Missing checks when malloc returns NULL... |
| Дата | |
| Msg-id | 26290.1472564565@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Missing checks when malloc returns NULL... (Aleksander Alekseev <a.alekseev@postgrespro.ru>) |
| Список | pgsql-hackers |
Aleksander Alekseev <a.alekseev@postgrespro.ru> writes:
> I suggest to keep ShmemAlloc as is for backward compatibility and
> introduce a new procedure ShmemAllocSafe.
I think that's about the worst of all possible worlds, as it guarantees
having to touch most call sites. If there were more than one known caller
that really wanted the return-NULL behavior, exact backwards compatibility
might carry the day; but as things stand I think the odds are that most
call sites need an error check and probably have not got one. I'd rather
err in favor of "safe by default" than "backwards compatible".
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера