Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e1d08fa

Browse files
committed
Fix error in termination of COPY IN mode when using V2 protocol.
Report and fix per ljb, 8-Mar-04.
1 parent 6e7a0f3 commit e1d08fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/libpq/fe-exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.157 2004/03/05 01:53:59 tgl Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.158 2004/03/14 22:00:54 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1469,7 +1469,7 @@ PQputCopyEnd(PGconn *conn, const char *errormsg)
14691469
{
14701470
/* Send old-style end-of-data marker */
14711471
if (pqPutMsgStart(0, false, conn) < 0 ||
1472-
pqPuts("\\.\n", conn) < 0 ||
1472+
pqPutnchar("\\.\n", 3, conn) < 0 ||
14731473
pqPutMsgEnd(conn) < 0)
14741474
return -1;
14751475
}

0 commit comments

Comments
 (0)