From 5979d7384179a41390c1ed122c6cc60d30287e2a Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Sun, 26 Jul 1998 04:31:41 +0000 Subject: From: t-ishii@sra.co.jp As Bruce mentioned, this is due to the conflict among changes we made. Included patches should fix the problem(I changed all MB to MULTIBYTE). Please let me know if you have further problem. P.S. I did not include pathces to configure and gram.c to save the file size(configure.in and gram.y modified). --- src/backend/commands/copy.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/backend/commands/copy.c') diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 23af759af4..6789fd0696 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.50 1998/07/24 03:31:14 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.51 1998/07/26 04:30:23 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -37,7 +37,7 @@ #include "commands/trigger.h" #include -#ifdef MB +#ifdef MULTIBYTE #include "mb/pg_wchar.h" #endif @@ -1016,14 +1016,14 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim) char c; int done = 0; int i = 0; -#ifdef MB +#ifdef MULTIBYTE int mblen; int encoding; unsigned char s[2]; int j; #endif -#ifdef MB +#ifdef MULTIBYTE encoding = pg_get_client_encoding(); s[1] = 0; #endif @@ -1129,7 +1129,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim) } if (!done) { attribute[i++] = c; -#ifdef MB +#ifdef MULTIBYTE s[0] = c; mblen = pg_encoding_mblen(encoding, s); mblen--; @@ -1145,7 +1145,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim) elog(ERROR, "CopyReadAttribute - attribute length too long. line: %d", lineno); } attribute[i] = '\0'; -#ifdef MB +#ifdef MULTIBYTE return(pg_client_to_server((unsigned char*)attribute, strlen(attribute))); #else return (&attribute[0]); @@ -1157,20 +1157,20 @@ CopyAttributeOut(FILE *fp, unsigned char *server_string, char *delim, int is_arr { unsigned char *string; unsigned char c; -#ifdef MB +#ifdef MULTIBYTE int mblen; int encoding; int i; #endif -#ifdef MB +#ifdef MULTIBYTE string = pg_server_to_client(server_string, strlen(server_string)); encoding = pg_get_client_encoding(); #else string = server_string; #endif -#ifdef MB +#ifdef MULTIBYTE for (; (mblen = pg_encoding_mblen(encoding, string)) && ((c = *string) != '\0'); string += mblen) #else @@ -1197,7 +1197,7 @@ CopyAttributeOut(FILE *fp, unsigned char *server_string, char *delim, int is_arr fputc('\\', fp); } } -#ifdef MB +#ifdef MULTIBYTE for (i=0;i