Re: How about a psql backslash command to show GUCs? - Mailing list pgsql-hackers

From Jonathan S. Katz
Subject Re: How about a psql backslash command to show GUCs?
Date
Msg-id 7bba5a32-65fe-04e1-7c36-efd963a625c9@postgresql.org
Whole thread Raw
In response to Re: How about a psql backslash command to show GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How about a psql backslash command to show GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 4/11/22 4:11 PM, Tom Lane wrote:
> "Jonathan S. Katz" <jkatz@postgresql.org> writes:
>> My question is if we're only going to list out the settings that are
>> customized, are we going to:
> 
>> 1. Hide a setting if it matches a default value, even if a user set it
>> to be the default value? OR
>> 2. Comment out all of the settings in a generated postgresql.conf file?
> 
> As committed, it prints anything that's shown as "source != 'default'"
> in pg_settings, which means anything for which the value wasn't
> taken from the wired-in default.  I suppose an alternative definition
> could be "setting != boot_val".  Not really sure if that's better.
> 
> This idea does somewhat address my unhappiness upthread about printing
> values with source = 'internal', but I see that it gets confused by
> some GUCs with custom show hooks, like unix_socket_permissions.
> Maybe it needs to be "source != 'default' AND setting != boot_val"?

Running through a few GUCs, that seems reasonable. Happy to test the 
patch out prior to commit to see if it renders better.

Jonathan

Attachment

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: random() function documentation
Next
From: Peter Smith
Date:
Subject: Re: row filtering for logical replication