Re: GUC names in messages
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Peter Smith <smithpb2250@gmail.com>, Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Nathan Bossart <nathandbossart@gmail.com>,
Laurenz Albe <laurenz.albe@cybertec.at>, Tom Lane <tgl@sss.pgh.pa.us>,
Daniel Gustafsson <daniel@yesql.se>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-12-21T13:24:00Z
Lists: pgsql-hackers
On 21.12.23 07:24, Peter Smith wrote: > #1. GUC name quoting. > > Some basic guidelines were decided and a patch is already pushed [1]. > > <para> > In messages containing configuration variable names, do not include quotes > when the names are visibly not natural English words, such as when they > have underscores, 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> > > AFAIK there is nothing controversial there, although maybe the > guideline for 'mixed case' needs revisiting depending on objections > about point #2. Now that I read this again, I think this is wrong. We should decide the quoting for a category, not the actual content. Like, quote all file names; do not quote keywords. This led to the attempted patch to decide the quoting of GUC parameter names dynamically based on the actual content, which no one really liked. But then, to preserve consistency, we also need to be uniform in quoting GUC parameter names where the name is hardcoded.
Commits
-
Apply GUC name from central table in more places of guc.c
- f3f06b13308e 18.0 landed
-
Use camel case for "DateStyle" in some error messages
- 2e7c4abe5a88 18.0 landed
-
Unify some error messages to ease work of translators
- a68159ff2b32 18.0 landed
-
Apply more quoting to GUC names in messages
- b4db64270e0c 18.0 landed
-
Revise GUC names quoting in messages again
- 17974ec25946 17.0 landed
-
doc: Mention how to use quotes with GUC names in error messages
- a243569bf65c 17.0 landed
-
Apply quotes more consistently to GUC names in logs
- 8d9978a7176a 17.0 landed