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