Re: How about a psql backslash command to show GUCs?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Jonathan S. Katz" <jkatz@postgresql.org>
Cc: Joe Conway <mail@joeconway.com>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Mark Dilger <mark.dilger@enterprisedb.com>
Date: 2022-04-07T14:55:58Z
Lists: pgsql-hackers
"Jonathan S. Katz" <jkatz@postgresql.org> writes: > On 4/7/22 8:36 AM, Joe Conway wrote: >> I will say that I care about context far more often than unit or type >> though, so from my point of view I would switch them around with respect >> to which is only shown with verbose. > I disagree somewhat -- I agree the context should be in the regular > view, but unit and type are also important. If I had to choose to drop > one, I'd choose type as it could be inferred, but I would say better to > keep them all. Given the new ability to grant privileges on GUCs, context alone is not sufficient to know when something can be set. So the context and the privileges seem like they should go together, and that's why I have them both under "+". I can see the argument for relegating type to the "+" format, in hopes of keeping the default display narrow enough for ordinary terminal windows. > A couple of minor things: > + appendPQExpBufferStr(&buf, "ORDER BY 1;"); > I don't know how much we do positional ordering in our queries, but it > may be better to explicitly order by "s.name". "ORDER BY n" seems to be the de facto standard in describe.c. Perhaps there's an argument for changing it throughout that file, but I don't think this one function should be out of step with the rest. > I don't know if we want to throw a "LOWER(s.name)" on at least the > ordering, given we allow for "SHOW" itself to load these case-insensitively. Yeah, I went back and forth on that myself --- I was looking at the example of DateStyle, and noticing that although you see it in mixed case in the command's output, tab completion isn't happy unless you enter it in lower case (ie, date<TAB> works, Date<TAB> not so much). Forcibly lowercasing the command output would fix that inconsistency, but on the other hand it introduces an inconsistency with what the pg_settings view shows. Not sure what's the least bad. We might be able to fix the tab completion behavior, if we don't mind complicating tab-complete.c even more; so probably that's the thing to look at before changing the output. > Maybe to appeal to all crowds, we say "list configuration parameters > (GUCs)"? I'm in the camp that says that GUC is not an acronym we wish to expose to end users. regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Be more careful about GucSource for internally-driven GUC settings.
- 7ab5b4eb4834 15.0 landed
-
Fix case sensitivity in psql's tab completion for GUC names.
- b5607b0746f4 15.0 landed
-
Further tweak the default behavior of psql's \dconfig.
- 139d46ee26a2 15.0 landed
-
Tweak the default behavior of psql's \dconfig.
- 5e70d8b5d18b 15.0 landed
-
psql: add \dconfig command to show server's configuration parameters.
- 3e707fbb4009 15.0 landed
-
Allow granting SET and ALTER SYSTEM privileges on GUC parameters.
- a0ffa885e478 15.0 cited