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-10-07T04:21:54Z
Lists: pgsql-hackers
Attachments
- v13-0001-Apply-GUC-name-from-central-table-in-more-places.patch (text/x-diff) patch v13-0001
On Tue, Sep 10, 2024 at 05:11:13PM +1000, Peter Smith wrote: > I have rebased the two remaining patches. See v12 attached. I've looked over the patch set again, and applied 0002. 0001 could be more ambitious and more consistent, like: - The GUC name coming from the table's record is only used for PGC_ENUM, let's use conf->gen.name across the board so as this counts for custom GUCs. - Once we do the first bullet point, parse_and_validate_value() can be simplified as it does not need its "name" argument anymore. - Once the second bullet point is simplified, going one way up reveals more in set_config_with_handle(). I was wondering about pg_parameter_aclcheck() for a bit until I've noticed convert_GUC_name_for_parameter_acl() that applies a conversion with the contents of the catalogs when checking for a parameter ACL, similar to guc_name_compare(). One limitation is in AlterSystemSetConfigFile() where the parameter name comes from the command and not a GUC record as the ACL check happens before the GUC table lookup, but we could live with that. At the end, I get the attached revised 0001. WDYT? -- Michael
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