Index: src/bin/psql/copy.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/copy.c,v
retrieving revision 1.50
diff -c -r1.50 copy.c
*** src/bin/psql/copy.c	11 Jul 2004 21:34:03 -0000	1.50
--- src/bin/psql/copy.c	13 Aug 2004 12:02:17 -0000
***************
*** 700,705 ****
--- 700,707 ----
  				c = getc(copystream);
  				if (c == '\n' || c == EOF)
  				{
+ 					if (c == '\n' && s != copybuf && *(s-1) == '\r')
+ 						*(s-1) = '\0';
  					linedone = true;
  					break;
  				}
