public inbox for [email protected]  
help / color / mirror / Atom feed
From: Hayato Kuroda (Fujitsu) <[email protected]>
To: Postgres hackers <[email protected]>
Subject: [PGdocs] fix description for handling pf non-ASCII characters
Date: Fri, 23 Jun 2023 14:25:13 +0000
Message-ID: <TYAPR01MB586631D0961BF9C44893FAB1F523A@TYAPR01MB5866.jpnprd01.prod.outlook.com> (raw)

Dear hackers,

While discussing based on the article[1] with Japanese developers, 
I found inconsistencies between codes and documents.

45b1a67a[2] changed the behavior when non-ASCII characters was set as application_name,
cluster_name and postgres_fdw.application_name, but it seemed not to be documented.
Previously non-ASCII chars were replaed with question makrs '?', but now they are replaced
with a hex escape instead.

How do you think? Is my understanding correct?

Acknowledgement:
Sawada-san and Shinoda-san led the developer's discussion.
Fujii-san was confirmed my points. Thank you for all of their works!

[1]: https://h50146.www5.hpe.com/products/software/oe/linux/mainstream/support/lcc/pdf/PostgreSQL16Beta1_...
[2]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=45b1a67a0fcb3f1588df596431871de4c...
 
Best Regards,
Hayato Kuroda
FUJITSU LIMITED



Attachments:

  [application/octet-stream] doc_fix.patch (2.5K, ../TYAPR01MB586631D0961BF9C44893FAB1F523A@TYAPR01MB5866.jpnprd01.prod.outlook.com/2-doc_fix.patch)
  download | inline diff:
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index e700782d3c..4fd94e324a 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 <structname>pg_stat_activity</structname> view
         and included in CSV log entries.  It can also be included in regular
         log entries via the <xref linkend="guc-log-line-prefix"/> parameter.
-        Only printable ASCII characters may be used in the
-        <varname>application_name</varname> value. Other characters will be
-        replaced with question marks (<literal>?</literal>).
+        Non-ASCII characters used in the <varname>application_name</varname>
+        will be replaced with a hex escape.
        </para>
       </listitem>
      </varlistentry>
@@ -8037,11 +8036,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
        <para>
         The name can be any string of less
         than <symbol>NAMEDATALEN</symbol> characters (64 characters in a standard
-        build). Only printable ASCII characters may be used in the
-        <varname>cluster_name</varname> value. Other characters will be
-        replaced with question marks (<literal>?</literal>).  No name is shown
-        if this parameter is set to the empty string <literal>''</literal> (which is
-        the default). This parameter can only be set at server start.
+        build). Non-ASCII characters used in the <varname>cluster_name</varname>
+        will be replaced with a hex escape. No name is shown if this parameter
+        is set to the empty string <literal>''</literal> (which is the
+        default). This parameter can only be set at server start.
        </para>
       </listitem>
      </varlistentry>
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index 5062d712e7..ddd93e315c 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -1068,8 +1068,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
       it's passed to and used as <varname>application_name</varname>
       in a foreign server, note that it will be truncated to less than
       <symbol>NAMEDATALEN</symbol> characters and anything other than
-      printable ASCII characters will be replaced with question
-      marks (<literal>?</literal>).
+      printable ASCII characters will be replaced with a hex escape.
       See <xref linkend="guc-application-name"/> for details.
      </para>
 


view thread (3+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [PGdocs] fix description for handling pf non-ASCII characters
  In-Reply-To: <TYAPR01MB586631D0961BF9C44893FAB1F523A@TYAPR01MB5866.jpnprd01.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox