From: Tatsuo Ishii Date: Wed, 27 Feb 2002 01:34:41 +0000 (+0000) Subject: Fix bug in COPY FROM when DELIMITER is not in ASCII range. X-Git-Tag: REL7_3~2021 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21f9a654f0d3b7ecb2023797df54abc52da4350e;p=thirdparty%2Fpostgresql.git 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 --- diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 26dbd82edb2..ecc7232dc05 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -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;