pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Be more wary about NULL values for GUC string variables.
Date: Thu, 02 Nov 2023 15:53:42 +0000
Message-ID: <E1qya0s-003brT-0P@gemulon.postgresql.org> (raw)

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6e1cca5113487bb9ef4daa1bb2833c6333466410

Modified Files
--------------
src/backend/utils/misc/guc.c   |  3 ++-
src/include/utils/guc_tables.h | 10 ++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1qya0s-003brT-0P@gemulon.postgresql.org>
Permalink:  ../E1qya0s-003brT-0P@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qya0s-003brT-0P@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Be more wary about NULL values for GUC string variables.
  In-Reply-To: <E1qya0s-003brT-0P@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox