From 139d46ee26a2c7813d02739d35fa305890643ac1 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 13 Apr 2022 15:03:58 -0400 Subject: [PATCH] Further tweak the default behavior of psql's \dconfig. Define "parameters with non-default settings" as being those that not only have pg_settings.source different from 'default', but also have a current value different from the hard-wired boot_val. Adding the latter restriction removes a number of not-very-interesting cases where the active setting is chosen by initdb but in practice tends to be the same all the time. Per discussion with Jonathan Katz. Discussion: https://postgr.es/m/YlFQLzlPi4QD0wSi@msg.df7cb.de --- src/bin/psql/describe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 1a2c6bc7f5b..839f1add900 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4408,7 +4408,8 @@ describeConfigurationParameters(const char *pattern, bool verbose, NULL, "pg_catalog.lower(s.name)", NULL, NULL); else - appendPQExpBufferStr(&buf, "WHERE s.source <> 'default'\n"); + appendPQExpBufferStr(&buf, "WHERE s.source <> 'default' AND\n" + " s.setting IS DISTINCT FROM s.boot_val\n"); appendPQExpBufferStr(&buf, "ORDER BY 1;");