diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-06-22 11:55:18 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-06-22 11:55:24 -0400 |
commit | f2c28bb1f2fee6fa33d2d6d4316b3f1d499543a4 (patch) | |
tree | 72122530623f755daba4711c15ad753fd876777d /src | |
parent | 7a349889ec1e80123f475fb171640b8273f921fd (diff) | |
download | postgresql-f2c28bb1f2fee6fa33d2d6d4316b3f1d499543a4.tar.gz postgresql-f2c28bb1f2fee6fa33d2d6d4316b3f1d499543a4.zip |
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@mail.gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 3cfd5b8a57e..c576986c6b2 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -828,7 +828,7 @@ PostmasterMain(int argc, char *argv[]) const char *config_val = GetConfigOption(output_config_variable, false, false); - puts(config_val ? config_val : "(null)"); + puts(config_val ? config_val : ""); ExitPostmaster(0); } |