Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ql1BT-000bYb-O2 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Sep 2023 06:04:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ql1BQ-008zWI-La for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Sep 2023 06:04:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ql1BQ-008zVy-Ax for pgsql-hackers@lists.postgresql.org; Tue, 26 Sep 2023 06:04:32 +0000 Received: from janus.karlpinc.com ([173.161.46.12] helo=smtp.karlpinc.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ql1BM-006gar-RG for pgsql-hackers@lists.postgresql.org; Tue, 26 Sep 2023 06:04:30 +0000 Received: from slate.karlpinc.com (unknown [192.168.1.14]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.karlpinc.com (Postfix) with ESMTPS id BD31BA22A; Tue, 26 Sep 2023 01:04:26 -0500 (CDT) Received: from slate.karlpinc.com (localhost [IPv6:::1]) by slate.karlpinc.com (Postfix) with ESMTPS id 740BE3FC9A; Tue, 26 Sep 2023 01:04:25 -0500 (CDT) Date: Tue, 26 Sep 2023 01:03:28 -0500 From: "Karl O. Pinc" To: "Hayato Kuroda (Fujitsu)" , 'jian he' Cc: Postgres hackers Subject: Re: [PGdocs] fix description for handling pf non-ASCII characters Message-ID: <20230926010328.2c556046@slate.karlpinc.com> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Hayato and Jian, On Tue, 4 Jul 2023 01:30:56 +0000 "Hayato Kuroda (Fujitsu)" wrote: > Dear Jian, > > looks fine. Do you need to add to commitfest? > > Thank you for your confirmation. ! I registered to following: > > https://commitfest.postgresql.org/44/4437/ The way the Postgres commitfest process works is that someone has to update the page to mark "reviewed" and the reviewer has to use the commitfest website to pass the patches to a committer. I see a few problems with the English and style of the patches and am commenting below and have signed up as a reviewer. At commitfest.postgresql.org I have marked the thread as needing author attention. Hayato, you will need to mark the thread as needing review when you have replied to this message. Jian, you might want to sign on as a reviewer as well. It can be nice to have that record of your participation. Now, to reviewing the patch: First, it is now best practice in the PG docs to put a line break at the end of each sentence. At least for the sentences on the lines you change. (No need to update the whole document!) Please do this in the next version of your patch. I don't know if this is a requirement for acceptance by a committer, but it won't hurt. diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index e700782d3c..a4ce99ba4d 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -7040,9 +7040,8 @@ local0.* /var/log/postgresql The name will be displayed in the pg_stat_activity view and included in CSV log entries. It can also be included in regular log entries via the parameter. - Only printable ASCII characters may be used in the - application_name value. Other characters will be - replaced with question marks (?). + Non-ASCII characters used in the application_name + will be replaced with hexadecimal strings. Don't use the future tense to describe the system's behavior. Instead of "will be" write "are". (Yes, this change would be an improvement on the original text. We should fix it while we're working on it and our attention is focused.) It is more accurate, if I understand the issue, to say that characters are replaced with hexadecimal _representations_ of the input bytes. Finally, it would be good to know what representation we're talking about. Perhaps just give the \xhh example and say: the Postgres C-style escaped hexadecimal byte value. And hyperlink to https://www.postgresql.org/docs/16/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE (The docbook would be, depending on text you want to link: C-style escaped hexadecimal byte value. I think. You link to id="someidvalue" attribute values.) @@ -8037,10 +8036,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; The name can be any string of less than NAMEDATALEN characters (64 characters in a standard - build). Only printable ASCII characters may be used in the - cluster_name value. Other characters will be - replaced with question marks (?). No name is shown - if this parameter is set to the empty string '' (which is + build). Non-ASCII characters used in the cluster_name + will be replaced with hexadecimal strings. No name is shown if this + parameter is set to the empty string '' (which is the default). This parameter can only be set at server start. Same review as for the first patch hunk. diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml index 5062d712e7..98785e87ea 100644 --- a/doc/src/sgml/postgres-fdw.sgml +++ b/doc/src/sgml/postgres-fdw.sgml @@ -1067,9 +1067,8 @@ postgres=# SELECT postgres_fdw_disconnect_all(); of any length and contain even non-ASCII characters. However when it's passed to and used as application_name in a foreign server, note that it will be truncated to less than - NAMEDATALEN characters and anything other than - printable ASCII characters will be replaced with question - marks (?). + NAMEDATALEN characters and non-ASCII characters will be + replaced with hexadecimal strings. See for details. Same review as for the first patch hunk. Since the both of you have looked and confirmed that the actual behavior matches the new documentation I have not done this. But, have either of you checked that we're really talking about replacing everything outside the 7-bit ASCII encodings? My reading of the commit referenced in the first email of this thread says that it's everything outside of the _printable_ ASCII encodings, ASCII values outside of the range 32 to 127, inclusive. Please check. The docs should probably say "printable ASCII", or "non-printable ASCII", depending. I think the meaning of "printable ASCII" is widely enough known to be 32-127. So "printable" is good enough, right? Regards, Karl Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein