Re: GUC names in messages
От | Peter Smith |
---|---|
Тема | Re: GUC names in messages |
Дата | |
Msg-id | CAHut+PtOqRPyVuX=xL=EhDAEWkpBh2MgeSW1KoyMjru-tEWO9w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: GUC names in messages (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: GUC names in messages
|
Список | pgsql-hackers |
On Fri, Nov 24, 2023 at 2:11 PM Michael Paquier <michael@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
Вложения
В списке pgsql-hackers по дате отправления: