From: Tom Lane <tgl@sss.pgh.pa.us>
To: kehan5800@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19747: pg_dump does not pin array_nulls, so restore mangles NULL array elements
Date: Mon, 05 Oct 2026 17:34:46 -0400
Message-ID: <1201948.1791236086@sss.pgh.pa.us> (raw)
In-Reply-To: <19747-69b01e7fc190cd58@postgresql.org>
References: <19747-69b01e7fc190cd58@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> pg_dump writes a null array element as the unquoted word NULL. Whether the
> array input function reads that as a null depends on array_nulls, which is
> PGC_USERSET and can be persisted with ALTER DATABASE/ROLE ... SET. The
> dump's preamble (_doSetFixedOutputState(), src/bin/pg_dump/
> pg_backup_archiver.c:3431) pins the other input-side settings
> (client_encoding, standard_conforming_strings, check_function_bodies,
> xmloption, row_security, ...) but not array_nulls, so the restoring session
> inherits the target database's value.
Meh. TBH, that GUC was past its shelf life ten years ago. What
I'd rather do about this report is just summarily remove the GUC.
If we make pg_dump issue a SET for it then we'll never be able
to remove it.
We could alternatively do what we've done with some other GUCs
whose time has passed: force them to have constant values and
accept SET commands only when the value matches. But I doubt
that this one ever got widespread enough use to justify doing that
much work. I'd rather just nuke it from orbit.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, kehan5800@gmail.com
Subject: Re: BUG #19747: pg_dump does not pin array_nulls, so restore mangles NULL array elements
In-Reply-To: <1201948.1791236086@sss.pgh.pa.us>
References: <19747-69b01e7fc190cd58@postgresql.org> <1201948.1791236086@sss.pgh.pa.us>
* 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