Re: Add support for __attribute__((returns_nonnull))

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Add support for __attribute__((returns_nonnull))
Дата
Msg-id 5d6eab56-c7d8-46d7-bb37-6a9fc6269a0a@eisentraut.org
обсуждение исходный текст
Ответ на Add support for __attribute__((returns_nonnull))  ("Tristan Partin" <tristan@neon.tech>)
Ответы Re: Add support for __attribute__((returns_nonnull))  ("Tristan Partin" <tristan@neon.tech>)
Список pgsql-hackers
On 19.12.23 21:43, Tristan Partin wrote:
> Here is a patch which adds support for the returns_nonnull attribute 
> alongside all the other attributes we optionally support.
> 
> I recently wound up in a situation where I was checking for NULL return 
> values of a function that couldn't ever return NULL because the 
> inability to allocate memory was always elog(ERROR)ed (aborted).
> 
> I didn't go through and mark anything, but I feel like it could be 
> useful for people going forward, including myself.

I think it would be useful if this patch series contained a patch that 
added some initial uses of this.  That way we can check that the 
proposed definition actually works, and we can observe what it does, 
with respect to warnings, static analysis, etc.




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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Bug in nbtree optimization to skip > operator comparisons (or < comparisons in backwards scans)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pg_stat_statements: more test coverage