Re: Granting SET and ALTER SYSTE privileges for GUCs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Granting SET and ALTER SYSTE privileges for GUCs
Date
Msg-id 895087.1648494675@sss.pgh.pa.us
Whole thread Raw
In response to Re: Granting SET and ALTER SYSTE privileges for GUCs  (Mark Dilger <mark.dilger@enterprisedb.com>)
Responses Re: Granting SET and ALTER SYSTE privileges for GUCs  (Mark Dilger <mark.dilger@enterprisedb.com>)
List pgsql-hackers
Mark Dilger <mark.dilger@enterprisedb.com> writes:
> Version 12 also introduces \dcp (pneumonic, "Describe Configuration Parameter") for listing parameters, with \dcp+
alsoshowing 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



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: [PATCH] Add extra statistics to explain for Nested Loop
Next
From: Tom Lane
Date:
Subject: Re: Granting SET and ALTER SYSTE privileges for GUCs