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 701b5d4de3dff4454215bd402848384a240d2e95..57bf76e067c32a37de79e8e0390cb48668dd69b3 100644 (file)
@@ -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;