Re: GUC flags
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: pryzby@telsasoft.com
Cc: michael@paquier.xyz, peter.eisentraut@enterprisedb.com,
pgsql-hackers@lists.postgresql.org, bruce@momjian.us, tgl@sss.pgh.pa.us
Date: 2022-01-05T02:47:57Z
Lists: pgsql-hackers
At Tue, 28 Dec 2021 20:32:40 -0600, Justin Pryzby <pryzby@telsasoft.com> wrote in
> On Thu, Dec 09, 2021 at 09:53:23AM -0600, Justin Pryzby wrote:
> > On Thu, Dec 09, 2021 at 05:17:54PM +0900, Michael Paquier wrote:
> > One option is to expose the GUC flags in pg_settings, so this can all be done
> > in SQL regression tests.
> >
> > Maybe the flags should be text strings, so it's a nicer user-facing interface.
> > But then the field would be pretty wide, even though we're only adding it for
> > regression tests. The only other alternative I can think of is to make a
> > sql-callable function like pg_get_guc_flags(text guc).
>
> Rebased on cab5b9ab2c066ba904f13de2681872dcda31e207.
>
> And added 0003, which changes to instead exposes the flags as a function, to
> avoid changing pg_settings and exposing internally-defined integer flags in
> that somewhat prominent view.
Just an idea but couldn't we use flags in a series of one-letter flag
representations? It is more user-friendly than integers but shorter
than full-text representation.
+SELECT name, flags FROM pg_settings;
name | flags
------------------------+--------
application_name | ARsec
transaction_deferrable | Arsec
transaction_isolation | Arsec
transaction_read_only | Arsec
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Commits
-
Add TAP test to automate the equivalent of check_guc, take two
- 7265dbffad7f 15.0 landed
-
Retire src/backend/utils/misc/check_guc
- cf29a11ef646 15.0 landed
-
Add TAP test to automate the equivalent of check_guc
- b0a55f4d4ad5 15.0 landed
-
Add PostgreSQL::Test::Cluster::config_data()
- ba15f16107be 15.0 landed
-
Introduce pg_settings_get_flags() to find flags associated to a GUC
- d10e41d4238e 15.0 landed
-
Revert changes about warnings/errors for placeholders.
- cab5b9ab2c06 15.0 cited
-
Improve the description of various GUCs
- 03774f9bb304 15.0 landed