Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 35717aa

Browse files
committed
Escape newline in select output, from A. Duursma.
1 parent 8bc7439 commit 35717aa

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
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.29 1997/05/20 03:39:02 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.30 1997/06/01 03:18:32 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -919,7 +919,7 @@ do_field(PQprintOpt *po, PGresult *res,
919919

920920
if (!skipit) {
921921
for (p=pval, o=buf; *p; *(o++)=*(p++)) {
922-
if ((fs_len==1 && (*p==*(po->fieldSep))) || *p=='\\')
922+
if ((fs_len==1 && (*p==*(po->fieldSep))) || *p=='\\' || *p=='\n')
923923
*(o++)='\\';
924924
if (po->align && (*pval=='E' || *pval=='e' ||
925925
!((*p>='0' && *p<='9') ||

0 commit comments

Comments
 (0)