From: Jonathan S. Katz <jkatz@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers@lists.postgresql.org, Pavel Luzanov <p.luzanov@postgrespro.ru>
Cc: Greg Stark <stark@mit.edu>
Cc: Mark Dilger <mark.dilger@enterprisedb.com>
Subject: Re: How about a psql backslash command to show GUCs?
Date: Thu, 7 Apr 2022 12:29:35 -0400
Message-ID: <ac22ff02-fd37-1f38-d49b-d83e90971f01@postgresql.org> (raw)
In-Reply-To: <3369130.1649348542@sss.pgh.pa.us>
References: <202204061758.leffczewl4kd@alvherre.pgsql>
<ae4c3347-d1c7-394f-9a7e-425af6f89a80@joeconway.com>
<3123259.1649270440@sss.pgh.pa.us>
<38891fd8-dceb-c956-ec5c-61c1a3e9486d@postgresql.org>
<3201870.1649294165@sss.pgh.pa.us>
<CAKFQuwaqBF_QoQC8aoqBiY4ggvBU6fR0k6CjeTQcoLy_9V4Sng@mail.gmail.com>
<6693b128-b9e5-fd5e-e8d2-b331dac52cb8@postgresql.org>
<3221981.1649300574@sss.pgh.pa.us>
<20220407152449.GD24419@telsasoft.com>
<3369130.1649348542@sss.pgh.pa.us>
On 4/7/22 12:22 PM, Tom Lane wrote:
> Justin Pryzby <pryzby@telsasoft.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.
+1
> 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.
I ran the equivalent SQL locally and it LGTM. Docs read well to me. Code
looks as good as it can to me.
+1
Jonathan
Attachments:
OpenPGP_signature (application/pgp-signature, 839B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: jkatz@postgresql.org, tgl@sss.pgh.pa.us, pryzby@telsasoft.com, david.g.johnston@gmail.com, mail@joeconway.com, alvherre@alvh.no-ip.org, p.luzanov@postgrespro.ru, stark@mit.edu, mark.dilger@enterprisedb.com
Subject: Re: How about a psql backslash command to show GUCs?
In-Reply-To: <ac22ff02-fd37-1f38-d49b-d83e90971f01@postgresql.org>
References: <202204061758.leffczewl4kd@alvherre.pgsql> <ae4c3347-d1c7-394f-9a7e-425af6f89a80@joeconway.com> <3123259.1649270440@sss.pgh.pa.us> <38891fd8-dceb-c956-ec5c-61c1a3e9486d@postgresql.org> <3201870.1649294165@sss.pgh.pa.us> <CAKFQuwaqBF_QoQC8aoqBiY4ggvBU6fR0k6CjeTQcoLy_9V4Sng@mail.gmail.com> <6693b128-b9e5-fd5e-e8d2-b331dac52cb8@postgresql.org> <3221981.1649300574@sss.pgh.pa.us> <20220407152449.GD24419@telsasoft.com> <3369130.1649348542@sss.pgh.pa.us> <ac22ff02-fd37-1f38-d49b-d83e90971f01@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox