Re: How about a psql backslash command to show GUCs?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Greg Stark <stark(at)mit(dot)edu>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Subject: Re: How about a psql backslash command to show GUCs?
Date: 2022-04-07 16:22:22
Message-ID: 3369130.1649348542@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Justin Pryzby <pryzby(at)telsasoft(dot)com> writes:
> SHOW and current_setting() translate to human units, which is particularly
> useful for some settings, like those with units of 8k pages.
> Is it better to use that "cooked" version for display in the backslash command
> instead of the raw view from pg_settings ?

Oh, that's a good idea --- lets us drop the units column entirely.

The attached revision does that and moves the "type" column to
secondary status, as discussed upthread. I also added docs and
simple regression tests, and fixed two problems that were preventing
completion of custom (qualified) GUC names (we need to use the
VERBATIM option for those queries). There remains the issue that
tab completion for GUC names ought to be case-insensitive, but
that's a pre-existing bug in tab-complete.c's other GUC name
completions too; I'll tackle it later.

As for the name, \dconf has a slight plurality in votes so far,
so I'm sticking with that.

I think this is ready to go unless someone has a significantly
better idea.

regards, tom lane

Attachment Content-Type Size
add-backslash-dconf-command-1.patch text/x-diff 9.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-04-07 16:29:33 Re: How about a psql backslash command to show GUCs?
Previous Message Mark Dilger 2022-04-07 16:19:33 Re: How about a psql backslash command to show GUCs?