From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Cc: leiyanliang@highgo.com
Subject: Re: BUG #16997: parameter server_encoding's category problem
Date: Fri, 7 May 2021 17:13:16 +0530
Message-ID: <CALj2ACVfeikCKamTEGPrJSfYwQSYYmG0z5LSHK+B0QOP5Lefag@mail.gmail.com> (raw)
In-Reply-To: <16997-ff16127f6e0d1390@postgresql.org>
References: <16997-ff16127f6e0d1390@postgresql.org>
On Fri, May 7, 2021 at 3:11 PM PG Bug reporting form
<noreply@postgresql.org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference: 16997
> Logged by: yanliang lei
> Email address: leiyanliang@highgo.com
> PostgreSQL version: 13.1
> Operating system: CentOS7.6
> Description:
>
> In the following sql statement, parameter server_encoding's category is
> “Client Connection Defaults / Locale and Formatting”:
>
> postgres=# select category from pg_settings where name='server_encoding';
> -[ RECORD 1 ]------------------------------------------------
> category | Client Connection Defaults / Locale and Formatting
>
> postgres=#
>
> In the document
> https://www.postgresql.org/docs/current/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-FORMAT,
> there is no entry about parameter server_encoding.
>
> and in the document
> https://www.postgresql.org/docs/current/runtime-config-preset.html,there is
> a entry about parameter server_encoding.
>
> so, What is the parameter server_encoding's category?
Thanks for reporting. All the internal parameters that can't be set by
the users are under the "Preset Options" category. Likewise,
server_encoding, lc_collate and lc_ctype should also be listed under
the "Preset Options" category, even though there is a "Client
Connection Defaults / Locale and Formatting" category, which has user
configurable parameters. For instance, since the in_hot_standby is an
internal parameter, it is specified under the "Preset Options" even
though there is a "Replication / Standby Servers" category which
mentions all the user configurable parameters.
Therefore, I would say that the documentation is correct but the code
is not. Attached patch should fix this.
While on this, I also adjusted some of the wordings for the other
"Preset Options".
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.comAttachments:v1-0001-Move-server_encoding-server_encoding-lc_ctype-to-.patch (application/octet-stream, 3.4K) download
From eb4ccb150e813e1e995b24cd4efa111009a73c89 Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <bharath.rupireddy@enterprisedb.com>
Date: Fri, 7 May 2021 17:06:36 +0530
Subject: [PATCH v1] Move server_encoding,server_encoding,lc_ctype to Preset
Options
All the internal parameters that can't be set by the users are
under the "Preset Options" category. Likewise, server_encoding,
lc_collate and lc_ctype should also be listed under that category,
even though there is a "Client Connection Defaults / Locale and Formatting"
category, which is for user configurable parameters. For instance,
since the in_hot_standby is an internal parameter it is specified
under the "Preset Options" even though there is a
"Replication / Standby Servers" category which only mentions all the
user configurable parameters.
While on this, descriptions for some of the "Preset Options" are
reworded to be more meaningful.
---
src/backend/utils/misc/guc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.cindex f2c7c2486b..e6bdd53f44 100644--- a/src/backend/utils/misc/guc.c+++ b/src/backend/utils/misc/guc.c@@ -1869,7 +1869,7 @@ static struct config_bool ConfigureNamesBool[] =
{
{"integer_datetimes", PGC_INTERNAL, PRESET_OPTIONS,
- gettext_noop("Datetimes are integer based."),+ gettext_noop("Shows whether PostgreSQL server was built with support for 64-bit-integer dates and times."),
NULL,
GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
@@ -2416,7 +2416,7 @@ static struct config_int ConfigureNamesInt[] =
{
{"data_directory_mode", PGC_INTERNAL, PRESET_OPTIONS,
- gettext_noop("Mode of the data directory."),+ gettext_noop("Shows the permissions of the data directory had at the PostgreSQL server startup."),
gettext_noop("The parameter value is a numeric mode specification "
"in the form accepted by the chmod and umask system "
"calls. (To use the customary octal format the number "
@@ -4102,7 +4102,7 @@ static struct config_string ConfigureNamesString[] =
/* See main.c about why defaults for LC_foo are not all alike */
{
- {"lc_collate", PGC_INTERNAL, CLIENT_CONN_LOCALE,+ {"lc_collate", PGC_INTERNAL, PRESET_OPTIONS,
gettext_noop("Shows the collation order locale."),
NULL,
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
@@ -4113,7 +4113,7 @@ static struct config_string ConfigureNamesString[] =
},
{
- {"lc_ctype", PGC_INTERNAL, CLIENT_CONN_LOCALE,+ {"lc_ctype", PGC_INTERNAL, PRESET_OPTIONS,
gettext_noop("Shows the character classification and case conversion locale."),
NULL,
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
@@ -4209,8 +4209,8 @@ static struct config_string ConfigureNamesString[] =
{
/* Can't be set in postgresql.conf */
- {"server_encoding", PGC_INTERNAL, CLIENT_CONN_LOCALE,- gettext_noop("Sets the server (database) character set encoding."),+ {"server_encoding", PGC_INTERNAL, PRESET_OPTIONS,+ gettext_noop("Shows the PostgreSQL server character set encoding."),
NULL,
GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
@@ -4429,7 +4429,7 @@ static struct config_string ConfigureNamesString[] =
{
{"ssl_library", PGC_INTERNAL, PRESET_OPTIONS,
- gettext_noop("Name of the SSL library."),+ gettext_noop("Shows the name of the SSL library that this PostgreSQL server was built with."),
NULL,
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
--
2.25.1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: bharath.rupireddyforpostgres@gmail.com, pgsql-bugs@lists.postgresql.org, leiyanliang@highgo.com
Subject: Re: BUG #16997: parameter server_encoding's category problem
In-Reply-To: <CALj2ACVfeikCKamTEGPrJSfYwQSYYmG0z5LSHK+B0QOP5Lefag@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox