Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nd7IA-0004sx-Bd for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Apr 2022 09:22:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nd7I8-0000B7-UP for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Apr 2022 09:22:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nd7I8-0000Ay-Lg for pgsql-hackers@lists.postgresql.org; Sat, 09 Apr 2022 09:22:00 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nd7I3-0003CZ-0N for pgsql-hackers@lists.postgresql.org; Sat, 09 Apr 2022 09:21:59 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1477:7740:4c21:6a2e:62ac:2afb]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4Kb8l34vs8z3Dxj; Sat, 9 Apr 2022 11:21:51 +0200 (CEST) Date: Sat, 9 Apr 2022 11:21:51 +0200 From: Christoph Berg To: Tom Lane Cc: Pavel Stehule , "David G. Johnston" , Joe Conway , Mark Dilger , Andrew Dunstan , David Rowley , Alvaro Herrera , PostgreSQL Developers Subject: Re: How about a psql backslash command to show GUCs? Message-ID: References: <995e06b1-0e50-396e-fce3-934d5e511e27@dunslane.net> <3370142.1649348973@sss.pgh.pa.us> <2DB6EB50-04DF-49D1-BB5B-61C62898BB35@enterprisedb.com> <3370992.1649349445@sss.pgh.pa.us> <711e43b9-6499-6a8b-0802-fb549874658e@joeconway.com> <3400691.1649363759@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3400691.1649363759@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Tom Lane > Looks like the consensus has shifted to \dconfig. I'll do it like that. A bit late to the party, but two more ideas: The name has evolved from \dcp over various longer \d-things to the more verbose \dconfig. How about we evolve it even more and just call it \config? That would be much easier to remember - in fact after I seeing the patch the other day, I wanted to try it today and I was confused when \config didn't work, and had to read the git log to see how it's actually called. It also doesn't conflict with tab completion too much, \conf would work. The other bit is hiding non-default values. "\dconfig" by itself is very long and not very interesting. I have this in my .psqlrc that I use very often on servers I'm visiting: \set config 'SELECT name, current_setting(name), CASE source WHEN $$configuration file$$ THEN regexp_replace(sourcefile, $$^/.*/$$, $$$$)||$$:$$||sourceline ELSE source END FROM pg_settings WHERE source <> $$default$$;' I would think that if \dconfig showed the non-default settings only, it would be much more useful; the full list would still be available with "\dconfig *". This is in line with \dt only showing tables on the search_path, and "\dt *.*" showing all. Christoph