]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix bug in COPY FROM when DELIMITER is not in ASCII range.
authorTatsuo Ishii <ishii@postgresql.org>
Wed, 27 Feb 2002 01:34:41 +0000 (01:34 +0000)
committerTatsuo Ishii <ishii@postgresql.org>
Wed, 27 Feb 2002 01:34:41 +0000 (01:34 +0000)
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 26dbd82edb2970f82b430a777f98b1f5d891d10b..ecc7232dc05952ff24e2ea7a83d862a65ad75e31 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.148 2002/02/24 02:33:33 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.149 2002/02/27 01:34:41 ishii Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1041,7 +1041,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;