From 21f9a654f0d3b7ecb2023797df54abc52da4350e Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Wed, 27 Feb 2002 01:34:41 +0000 Subject: [PATCH] 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 26dbd82edb..ecc7232dc0 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;