public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alvaro Herrera <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Daniel Gustafsson <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: GUC names in messages
Date: Fri, 24 Nov 2023 10:53:40 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 2023-Nov-24, Michael Paquier wrote:
> On Thu, Nov 23, 2023 at 06:27:04PM +1100, Peter Smith wrote:
> > There may be some changes I've missed, but hopefully, this is a nudge
> > in the right direction.
>
> Thanks for spending some time on that.
+1
> <para>
> + In messages containing configuration variable names, do not include quotes
> + when the names are visibly not English natural words, such as when they
> + have underscores or are all-uppercase or have mixed case. Otherwise, quotes
> + must be added. Do include quotes in a message where an arbitrary variable
> + name is to be expanded.
> + </para>
>
> That seems to describe clearly the consensus reached on the thread
> (quotes for GUCs that are single terms, no quotes for names that are
> obviously parameters).
Yeah, this is pretty much the patch I proposed earlier.
> In terms of messages that have predictible names, 0002 moves in the
> needle in the right direction. There seem to be more:
> src/backend/postmaster/bgworker.c: errhint("Consider increasing the
> configuration parameter \"max_worker_processes\".")));
> contrib/pg_prewarm/autoprewarm.c: errhint("Consider increasing
> configuration parameter \"max_worker_processes\".")));
Yeah. Also, these could be changed to have the GUC name outside the
message proper, which would reduce the total number of messages. (But
care must be given to the word "the" there.)
> Things like parse_and_validate_value() and set_config_option_ext()
> include log strings about GUC and these use quotes. Could these areas
> be made smarter with a routine to check if quotes are applied
> automatically when we have a "simple" GUC name, aka I guess made of
> only lower-case characters? This could be done with a islower() on
> the string name, for instance.
I think we could leave these improvements for a second round. They
don't need to hold back the improvement we already have.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"You're _really_ hosed if the person doing the hiring doesn't understand
relational systems: you end up with a whole raft of programmers, none of
whom has had a Date with the clue stick." (Andrew Sullivan)
https://postgr.es/m/[email protected]
view thread (21+ 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], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: GUC names in messages
In-Reply-To: <[email protected]>
* 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