]> granicus.if.org Git - postgresql/commitdiff
Back-patch fix for followings:
authorTatsuo Ishii <ishii@postgresql.org>
Wed, 27 Feb 2002 01:47:31 +0000 (01:47 +0000)
committerTatsuo Ishii <ishii@postgresql.org>
Wed, 27 Feb 2002 01:47:31 +0000 (01:47 +0000)
Fix bug in COPY FROM when DELIMITER is not in ASCII range.
See pgsql-bugs/pgsql-hackers discussion "COPY FROM is not 8bit clean"
around 2002/02/26 for more details -- Tatsuo Ishii

src/backend/commands/copy.c

index f42b865687c6fa0caa6f0904fe0e4be786e1a69e..d49788b8e18f4357a574e183f4a8d2087c0d66f3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.145 2002/02/12 21:25:41 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.145.2.1 2002/02/27 01:47:31 ishii Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1024,7 +1024,7 @@ static char *
 CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline, char *null_print)
 {
        int                     c;
-       int                     delimc = delim[0];
+       int                     delimc = (unsigned char)delim[0];
 
 #ifdef MULTIBYTE
        int                     mblen;