On Fri, Nov 24, 2023 at 2:11 PM Michael Paquier <mich...@paquier.xyz> 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. > > <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). > > 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\".")));
Done in patch 0002 > > 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. See what you think of patch 0003 ~~ PSA v2 patches. ====== Kind Regards, Peter Smith. Fujitsu Australia
v2-0001-GUC-names-docs.patch
Description: Binary data
v2-0002-GUC-names-fix-quotes.patch
Description: Binary data
v2-0003-GUC-names-maybe-add-quotes.patch
Description: Binary data