From d85096ce12965d5b642d524b3b930caa0e932dec Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 14 Jan 2008 18:46:49 +0000 Subject: Fix an ancient oversight in libpq's handling of V3-protocol COPY OUT mode: we need to be able to swallow NOTICE messages, and potentially also ParameterStatus messages (although the latter would be a bit weird), without exiting COPY OUT state. Fix it, and adjust the protocol documentation to emphasize the need for this. Per off-list report from Alexander Galler. --- doc/src/sgml/protocol.sgml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 54983bdb74e..9d7d7e76410 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -1,4 +1,4 @@ - + Frontend/Backend Protocol @@ -953,9 +953,16 @@ In the event of a backend-detected error during copy-out mode, the backend will issue an ErrorResponse message and revert to normal - processing. The frontend should treat receipt of ErrorResponse (or - indeed any message type other than CopyData or CopyDone) as terminating - the copy-out mode. + processing. The frontend should treat receipt of ErrorResponse as + terminating the copy-out mode. + + + + It is possible for NoticeResponse messages to be interspersed between + CopyData messages; frontends must handle this case, and should be + prepared for other asynchronous message types as well (see ). Otherwise, any message type other than + CopyData or CopyDone may be treated as terminating copy-out mode. -- cgit v1.2.3