Re: Don't pass NULL pointer to strcmp(). - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Don't pass NULL pointer to strcmp().
Date
Msg-id 2948214.1698892744@sss.pgh.pa.us
Whole thread Raw
In response to Re: Don't pass NULL pointer to strcmp().  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Don't pass NULL pointer to strcmp().
List pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> On Wed, Nov 01, 2023 at 09:57:18PM -0400, Tom Lane wrote:
>> After digging around for a bit, I think part of the problem is a lack
>> of a clearly defined spec for what should happen with NULL string GUCs.

> What if we disallowed NULL string GUCs in v17?

Well, we'd need to devise some other solution for hacks like the
one used by timezone_abbreviations (see comment in
check_timezone_abbreviations).  I think it's not worth the trouble,
especially seeing that 95% of guc.c is already set up for this.
The bugs are mostly in newer code like get_explain_guc_options,
and I think that's directly traceable to the lack of any comments
or docs about this behavior.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Don't pass NULL pointer to strcmp().
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: A recent message added to pg_upgade