Be more wary about NULL values for GUC string variables.
commit82063edd4ac366161d9afa56221c74032b332c39
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 2 Nov 2023 15:47:33 +0000 (2 11:47 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 2 Nov 2023 15:47:33 +0000 (2 11:47 -0400)
treedd0806dbde775716e37f89ec21fe66816c4e04b1
parente22819a747365facbe8f504dc3a4996a02114e05
Be more wary about NULL values for GUC string variables.

get_explain_guc_options() crashed if a string GUC marked GUC_EXPLAIN
has a NULL boot_val.  Nosing around found a couple of other places
that seemed insufficiently cautious about NULL string values, although
those are likely unreachable in practice.  Add some commentary
defining the expectations for NULL values of string variables,
in hopes of forestalling future additions of more such bugs.

Xing Guo, Aleksander Alekseev, Tom Lane

Discussion: https://postgr.es/m/CACpMh+AyDx5YUpPaAgzVwC1d8zfOL4JoD-uyFDnNSa1z0EsDQQ@mail.gmail.com
src/backend/utils/misc/guc.c
src/include/utils/guc_tables.h