| От | Nathan Bossart |
|---|---|
| Тема | Re: Assert name/short_desc to prevent SHOW ALL segfault |
| Дата | |
| Msg-id | 20220526214550.GA1513741@nathanxps13 обсуждение исходный текст |
| Ответ на | Re: Assert name/short_desc to prevent SHOW ALL segfault (Andres Freund <andres@anarazel.de>) |
| Ответы |
Re: Assert name/short_desc to prevent SHOW ALL segfault
|
| Список | pgsql-hackers |
On Tue, May 24, 2022 at 11:17:39PM -0700, Andres Freund wrote: > On 2022-05-24 11:41:49 -0700, Nathan Bossart wrote: >> I would actually ERROR on this so that we aren't relying on >> --enable-cassert builds to catch it. > > How about adding pg_nonnull(...) (ending up as __attribute__((nonnull(...))? > Then code passing NULLs would get compiler warnings? It'd be useful in quite a > few more places. I attached an attempt at this for the "name" and "valueAddr" arguments for the DefineCustomXXXVariable functions. It looked like nonnull was supported by GCC and Clang, but I haven't looked too closely to see whether we need version checks as well. >> That being said, if there's no strong reason to enforce that a short >> description be provided, then why not adjust ShowAllGUCConfig() to set that >> column to NULL when short_desc is missing? > > There's a bunch more places that'd need to be adjusted, if we go that way. I > don't really have an opinion on it. I looked around and didn't see anywhere else obvious that needed adjustment besides what Michael pointed out (3ac7d024). Am I missing something? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера