public inbox for [email protected]
help / color / mirror / Atom feedFrom: Melanie Plageman <[email protected]>
To: Daniel Westermann (DWE) <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: pgsql: Modularize log_connections output
Date: Wed, 12 Mar 2025 12:07:24 -0400
Message-ID: <CAAKRu_ZHECM5htitn09XyssxmQF9Jkpw+7EK4g5_VqEpkfQPBg@mail.gmail.com> (raw)
In-Reply-To: <GV0P278MB041968707F13439C8E670752D2D02@GV0P278MB0419.CHEP278.PROD.OUTLOOK.COM>
References: <[email protected]>
<GV0P278MB041968707F13439C8E670752D2D02@GV0P278MB0419.CHEP278.PROD.OUTLOOK.COM>
Thanks for taking a look!
On Wed, Mar 12, 2025 at 11:50 AM Daniel Westermann (DWE)
<[email protected]> wrote:
>
>
> great, thanks for this. One question:
>
> >The current log_connections options are 'receipt', 'authentication', and
> >'authorization'. The empty string disables all connection logging. 'all'
> >enables all available connection logging.
>
> ... shouldn't this be added to tab completion as well?
>
> postgres=# alter system set log_connections TO DEFAULT
Because it is now a string GUC, there isn't a facility for tab
completion. Enum and boolean GUCs have a defined set of options which
can be provided as options for tab completion. Because string GUCs
don't have to have a set of defined options, they don't have tab
completion (AFAIK). For example, you couldn't have a defined set of
options for log_line_prefix.
There are a subset of the string GUCs that do have predefined options
which they validate in their check hooks. Many of these are GUCs which
can accept some combination of options -- so they don't fit well into
the enum GUC type (for example, debug_io_direct).
While writing this feature, I did consider if we should add a new GUC
type PGC_SET [1] which would back GUCs that accept any subset of a
predefined set of options. This would allow us to have tab completion.
I didn't end up doing this because I felt tab completion was the only
advantage it would provide this patch and it would be a big code
change, but it is definitely something to consider in the future.
- Melanie
[1] https://www.postgresql.org/message-id/CAAKRu_a5-7sUP%2BQ6YD5emQYS1w7ffBDUNf-NMbcxR-dpOdGehw%40mail.g...
view thread (5+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: pgsql: Modularize log_connections output
In-Reply-To: <CAAKRu_ZHECM5htitn09XyssxmQF9Jkpw+7EK4g5_VqEpkfQPBg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox