Further tweak the default behavior of psql's \dconfig.
authorTom Lane <[email protected]>
Wed, 13 Apr 2022 19:03:58 +0000 (15:03 -0400)
committerTom Lane <[email protected]>
Wed, 13 Apr 2022 19:03:58 +0000 (15:03 -0400)
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/[email protected]

src/bin/psql/describe.c

index 1a2c6bc7f5bd1e0a6b02f13f3bb52e0641fe41e1..839f1add900ef17926958338e141d43e17b48ce5 100644 (file)
@@ -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;");