Apply GUC name from central table in more places of guc.c
authorMichael Paquier <michael@paquier.xyz>
Wed, 9 Oct 2024 09:47:34 +0000 (18:47 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 9 Oct 2024 09:47:34 +0000 (18:47 +0900)
commitf3f06b13308e3c250bb8b0afee861744cda06cf6
tree2fa4e0de598c950afc5d311c1dfda7653d4dbc44
parent67a54b9e83d331eadd3a595e6c3bfec06288d2c4
Apply GUC name from central table in more places of guc.c

The name extracted from the record of the GUC tables is applied to more
internal places of guc.c.  This change has the advantage to simplify
parse_and_validate_value(), where the "name" was only used in elog
messages, while it was required to match with the name from the GUC
record.

pg_parameter_aclcheck() now passes the name of the GUC from its record
in two places rather than the caller's argument.  The value given to
this function goes through convert_GUC_name_for_parameter_acl() that
does a simple ASCII downcasing.

Few GUCs mix character casing in core; one test is added for one of
these code paths with "IntervalStyle".

Author: Peter Smith, Michael Paquier
Discussion: https://postgr.es/m/ZwNh4vkc2NHJHnND@paquier.xyz
src/backend/utils/misc/guc.c
src/test/regress/expected/guc.out
src/test/regress/sql/guc.sql