pgsql: Make "postgres -C guc" print "" not "(null)" for null-valued GUC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make "postgres -C guc" print "" not "(null)" for null-valued GUC
Date: 2016-06-22 15:56:14
Message-ID: E1bFkVi-00047a-JX@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make "postgres -C guc" print "" not "(null)" for null-valued GUCs.

Commit 0b0baf262 et al made this case print "(null)" on the grounds that
that's what happened on platforms that didn't crash. But neither behavior
was actually intentional. What we should print is just an empty string,
for compatibility with the behavior of SHOW and other ways of examining
string GUCs. Those code paths don't distinguish NULL from empty strings,
so we should not here either. Per gripe from Alain Radix.

Like the previous patch, back-patch to 9.2 where -C option was introduced.

Discussion: <CA+YdpwxPUADrmxSD7+Td=uOshMB1KkDN7G7cf+FGmNjjxMhjbw(at)mail(dot)gmail(dot)com>

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f22a3e5ce1237936422471a05cf0776c266034cf

Modified Files
--------------
src/backend/postmaster/postmaster.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-06-22 20:52:57 pgsql: Fix type-safety problem with parallel aggregate serial/deseriali
Previous Message Peter Eisentraut 2016-06-22 02:06:39 pgsql: Improve cleanup in rolenames test