]> granicus.if.org Git - postgresql/commitdiff
Fix error in termination of COPY IN mode when using V2 protocol.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 14 Mar 2004 22:00:54 +0000 (22:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 14 Mar 2004 22:00:54 +0000 (22:00 +0000)
Report and fix per ljb, 8-Mar-04.

src/interfaces/libpq/fe-exec.c

index d2ad75bb23b591662ce46f11651e1b0a72c91bef..6e8c2153e0aef3d1d16a2be812687d964e58c25e 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.157 2004/03/05 01:53:59 tgl Exp $
+ *       $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.158 2004/03/14 22:00:54 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1469,7 +1469,7 @@ PQputCopyEnd(PGconn *conn, const char *errormsg)
                {
                        /* Send old-style end-of-data marker */
                        if (pqPutMsgStart(0, false, conn) < 0 ||
-                               pqPuts("\\.\n", conn) < 0 ||
+                               pqPutnchar("\\.\n", 3, conn) < 0 ||
                                pqPutMsgEnd(conn) < 0)
                                return -1;
                }