Re: GUC names in messages

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Peter Smith <smithpb2250@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, 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: 2024-09-04T05:54:43Z
Lists: pgsql-hackers
On Wed, Sep 04, 2024 at 09:17:15AM +1000, Peter Smith wrote:
> I have merged the patches 0001-0004 as suggested. Please see v11 attachments.

Thanks.

It took me some time to go through the whole tree for more
inconsistencies.

In 0001, search_path was missing quotes in vacuumlo.c and oid2name.c.
Not the most critical tools ever, still fixed these.

CheckRequiredParameterValues() has two "wal_level=minimal".  Shouldn't
separate quotes be used for the GUC name and its value to be more
consistent with the rest?  There are also two "full_page_writes=off"
in xlog.c.  Point mentioned at [1] by Daniel on v6, changed as they
are on HEAD by 17974ec25946.

In 0004, there are a couple of changes where this does not represent a
gain for translators, and it was even made worse.  For example
huge_page_size updated for sysv but not WIN32, leading to two
messages.  The changes in postgres.c, predicate.c, syncrep.c and
variable.c don't show a gain.

The changes in dfmgr.c should have a translator note, I think, because
it becomes unclear what these messages are about.

By the way, I don't get why we use "/*- translator:" in some places
while we document to use "/* translator:" in the NLS section of the
docs.  One pattern is much more used than the other, guess which one.

0001 and 0004 have been applied with these tweaks.  I am still not
sure about the changes for DateStyle and IntervalStyle in 0002 and
0003.  Perhaps others have an opinion that could drive to a consensus.

[1]: https://www.postgresql.org/message-id/2162891.1715890833@sss.pgh.pa.us
--
Michael

Commits

  1. Apply GUC name from central table in more places of guc.c

  2. Use camel case for "DateStyle" in some error messages

  3. Unify some error messages to ease work of translators

  4. Apply more quoting to GUC names in messages

  5. Revise GUC names quoting in messages again

  6. doc: Mention how to use quotes with GUC names in error messages

  7. Apply quotes more consistently to GUC names in logs