Re: GUC names in messages

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Peter Smith <smithpb2250@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, 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-05-17T11:57:51Z
Lists: pgsql-hackers
On 17.05.24 05:31, Peter Smith wrote:
>> I think we should accept your two patches
>>
>> v6-0001-GUC-names-docs.patch
>> v6-0002-GUC-names-add-quotes.patch
>>
>> which effectively everyone was in favor of and which seem to be the most
>> robust and sustainable solution.
>>
>> (The remaining three patches from the v6 set would be PG18 material at
>> this point.)
> Thanks very much for taking an interest in resurrecting this thread.
> 
> It was always my intention to come back to this when the dust had
> settled on PG17. But it would be even better if the docs for the rule
> "just quote everything", and anything else you deem acceptable, can be
> pushed sooner.
> 
> Of course, there will still be plenty more to do for PG18, including
> locating examples in newly pushed code for messages that have slipped
> through the cracks during the last few months using different formats,
> and other improvements, but those tasks should become easier if we can
> get some of these v6 patches out of the way first.

I committed your 0001 and 0002 now, with some small fixes.

There has also been quite a bit of new code, of course, since you posted 
your patches, so we'll probably find a few more things that could use 
adjustment.

I'd be happy to consider the rest of your patch set after beta1 and/or 
for PG18.




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