Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fjGGw-0007Tc-5d for pgsql-docs@arkaria.postgresql.org; Sat, 28 Jul 2018 03:52:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fjGGu-0001wp-JZ for pgsql-docs@arkaria.postgresql.org; Sat, 28 Jul 2018 03:52:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fjGGu-0001wi-5c for pgsql-docs@lists.postgresql.org; Sat, 28 Jul 2018 03:52:00 +0000 Received: from sraihb2.sra.co.jp ([202.32.10.6]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fjGGq-0000HT-Iu for pgsql-docs@postgresql.org; Sat, 28 Jul 2018 03:51:58 +0000 Received: from srascf.sra.co.jp (srascf [133.137.8.80]) by sraihb2.sra.co.jp (Postfix) with ESMTP id 4CB312A1666 for ; Sat, 28 Jul 2018 12:51:54 +0900 (JST) Received: from srascb.sra.co.jp (unknown [133.137.8.65]) by srascf.sra.co.jp with smtp id 0c31_011f_4313a84e_b401_4e22_ac77_e6ac4da3a7b3; Sat, 28 Jul 2018 12:51:53 +0900 Received: from sranhm.sra.co.jp (osspc25 [133.137.174.97]) by srascb.sra.co.jp (Postfix) with ESMTP id 337E62D6942 for ; Sat, 28 Jul 2018 12:51:54 +0900 (JST) Received: from localhost (sraihb-hub.sra.co.jp [133.137.8.6]) by sranhm.sra.co.jp (Postfix) with ESMTP id 0BB11A0DB5 for ; Sat, 28 Jul 2018 12:51:54 +0900 (JST) Date: Sat, 28 Jul 2018 12:51:53 +0900 (JST) Message-Id: <20180728.125153.1487613390757751788.t-ishii@sraoss.co.jp> To: pgsql-docs@postgresql.org Subject: Enhancing protocol.sgml From: Tatsuo Ishii X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sat_Jul_28_12_51_53_2018_375)--" Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ----Next_Part(Sat_Jul_28_12_51_53_2018_375)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In libpq.sgml following is stated: Before PostgreSQL protocol 3.0, it was necessary for the application to explicitly send the two characters \. as a final line to indicate to the server that it had finished sending COPY data. While this still works, it is deprecated and the special meaning of \. can be expected to be removed in a future release. It is sufficient to call PQendcopy after having sent the actual data. I think this should be mentioned in protocol.sgml as well. Developers who wish to develop programs that understands frontend/backend protocol should be able to focus on protocol.sgml. Attached is a patch for this. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp ----Next_Part(Sat_Jul_28_12_51_53_2018_375)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="protocol.diff" diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 46d7e19..a98e4af 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). + + + Before PostgreSQL protocol 3.0, it was necessary + for the application to explicitly send the two characters + \. as a final line to indicate to the server that it + had finished sending COPY data. Programs + implementing COPY in protocol 3.0 + including PostgreSQL need to check and + ignore + \. just before COPYDone message for backward + compatibility sake. This requirement may be removed in the future. + + + In the event of a backend-detected error during copy-in mode (including receipt of a CopyFail message), the backend will issue an ErrorResponse ----Next_Part(Sat_Jul_28_12_51_53_2018_375)----