Re: Adding a note to protocol.sgml regarding CopyData

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Adding a note to protocol.sgml regarding CopyData
Дата
Msg-id 20180731.170319.2127112259369484600.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: Adding a note to protocol.sgml regarding CopyData  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: Adding a note to protocol.sgml regarding CopyData  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
Hi Fabien,

Thank you for the comment.

> Hello Tatsuo-san,
> 
> Minor suggestions, although I'm not a native English speaker.
> 
>> In libpq.sgml following is stated:
>>
>>        Before <productname>PostgreSQL</productname> protocol 3.0, it was
>>        necessary
>>        for the application to explicitly send the two characters
>>        <literal>\.</literal> as a final line to indicate to the server that
>>        it
> 
> ISTM That "it" may refer to the server... Put "the application"
> instead?
> 
>> had
>>        finished sending <command>COPY</command> data.  While this still
>>        works, it is deprecated and the
>>        special meaning of <literal>\.</literal> can be expected to be removed
>>        in a
>>        future release.
> 
> Maybe be more assertive, "will be removed"?
> 
>>  It is sufficient to call <function>PQendcopy</function> after
> 
> "It is now sufficient ..."?

Well, I did not intend to enhance libpq.sgml but maybe your points is
valid (I cannot judge because I am not an native English speaker).

So I am include your point to the patch and wait for feed back from
(possibly) native English speakers.

I also added to September commit fest, including you as a reviewer.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index d67212b..844d4a9 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -5754,11 +5754,12 @@ int PQputline(PGconn *conn,
        <para>
         Before <productname>PostgreSQL</productname> protocol 3.0, it was necessary
         for the application to explicitly send the two characters
-        <literal>\.</literal> as a final line to indicate to the server that it had
-        finished sending <command>COPY</command> data.  While this still works, it is deprecated and the
-        special meaning of <literal>\.</literal> can be expected to be removed in a
-        future release.  It is sufficient to call <function>PQendcopy</function> after
-        having sent the actual data.
+        <literal>\.</literal> as a final line to indicate to the server that
+        the application had finished sending <command>COPY</command> data.
+        While this still works, it is deprecated and the special meaning
+        of <literal>\.</literal> will be removed in a future release.  It is
+        sufficient to call <function>PQendcopy</function> after having sent
+        the actual data.
        </para>
       </note>
      </listitem>
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 46d7e19..fda989b 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1154,6 +1154,20 @@ SELCT 1/0;
     (if successful) or ErrorResponse (if not).
    </para>
 
+   <note>
+     <para>
+       Before <productname>PostgreSQL</productname> protocol 3.0, it was necessary
+       for the application to explicitly send the two characters
+       <literal>\.</literal> as a final line to indicate to the server that
+       the application had finished sending <command>COPY</command> data.
+       Programs implementing <command>COPY</command> in protocol 3.0
+       including <productname>PostgreSQL</productname> need to check and
+       ignore
+       <literal>\.</literal> just before COPYDone message for backward
+       compatibility sake. This requirement will be removed in the future.
+     </para>
+   </note>
+
    <para>
     In the event of a backend-detected error during copy-in mode (including
     receipt of a CopyFail message), the backend will issue an ErrorResponse

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Lakhin
Дата:
Сообщение: Re: make installcheck-world in a clean environment
Следующее
От: MyungKyu LIM
Дата:
Сообщение: [Todo item] Add entry creation timestamp column topg_stat_replication