|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||"Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>|
|Cc:||Joe Conway <mail(at)joeconway(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>|
|Subject:||Re: How about a psql backslash command to show GUCs?|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
"Jonathan S. Katz" <jkatz(at)postgresql(dot)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
I'm in the camp that says that GUC is not an acronym we wish to expose
to end users.
regards, tom lane
|Next Message||David G. Johnston||2022-04-07 15:10:14||Re: How about a psql backslash command to show GUCs?|
|Previous Message||Daniel Gustafsson||2022-04-07 14:55:27||Re: [PATCH] Add native windows on arm64 support|