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 1nYulx-0005W8-SI for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Mar 2022 19:11:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nYulw-00049p-Ni for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Mar 2022 19:11:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nYulw-00049c-Ew for pgsql-hackers@lists.postgresql.org; Mon, 28 Mar 2022 19:11:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nYulu-0005m9-J0 for pgsql-hackers@postgresql.org; Mon, 28 Mar 2022 19:11:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 22SJBFRx895088; Mon, 28 Mar 2022 15:11:16 -0400 From: Tom Lane To: Mark Dilger cc: Andrew Dunstan , Peter Eisentraut , Joshua Brindle , Robert Haas , Jeff Davis , PostgreSQL-development , Joe Conway Subject: Re: Granting SET and ALTER SYSTE privileges for GUCs In-reply-to: References: <3D691E20-C1D5-4B80-8BA5-6BEB63AF3029@enterprisedb.com> <2D6C1081-DB7D-4260-8987-5B4912E95917@enterprisedb.com> <1A6DA47B-2D5F-427E-AD72-1D8BD23BF94C@enterprisedb.com> <79685.1646604824@sss.pgh.pa.us> <83814.1646607430@sss.pgh.pa.us> <78889A65-CA7A-4015-866D-33460967071D@enterprisedb.com> <92485.1646609263@sss.pgh.pa.us> <43857434-3f9b-3! 66f-0401-7aea558827e1@dunslane.net> <664799.1647456444@sss.pgh.pa.us> <771410.1647528423@sss.pgh.pa.us> <9b37fa41-a068-81! 66-78c3-4503a867de07@dunslane.net> Comments: In-reply-to Mark Dilger message dated "Thu, 24 Mar 2022 09:49:24 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <895086.1648494675.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 28 Mar 2022 15:11:15 -0400 Message-ID: <895087.1648494675@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Mark Dilger writes: > Version 12 also introduces \dcp (pneumonic, "Describe Configuration Para= meter") for listing parameters, with \dcp+ also showing the acl, like: The fact that that code is not dry behind the ears is painfully obvious. It's not documented in psql-ref, not tested anywhere AFAICS, and its handling of the pattern parameter is inconsistent with every other \d command. The wildcard character should be * not %. It only accidentally fails to dump core if no pattern is given, too. > \dcp[+] only shows "user" and "superuser" parameters: Why make that restriction? Also, I find it astonishing that this doesn't show the GUC's value by default. The non-plus form of the command seems useless as it stands, or at least its intended use-case is so narrow I can't see it. If we're to have it at all, it seems like it ought to be a reasonably useful shortcut for interrogating pg_settings. I'd expect the base set of columns to be name, value, and possibly unit; then add ACL with +. I'm not sure that GucContext belongs in this at all, but if it does, it's a + column. On the whole perhaps this should be taken out again; it's a bit late in the cycle to be introducing new features, especially ones as subject to bikeshedding as a \d command is. My ideas about what columns to show probably wouldn't match anyone else's ... and we haven't even gotten to whether \dcp is an okay choice of name. regards, tom lane