From: Tom Lane Date: Thu, 26 Mar 2009 19:24:54 +0000 (+0000) Subject: Adjust phrasing of complaints about multi-byte COPY delimiter strings. X-Git-Tag: REL8_4_BETA1~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b793e8344a93b8c55eb01f4a94e7ca7c6898eb4b;p=postgresql Adjust phrasing of complaints about multi-byte COPY delimiter strings. Per pgsql-hackers discussion of 2009-02-17. --- diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 550e7e661f..611a343e3f 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.305 2009/02/06 21:15:11 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.306 2009/03/26 19:24:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -855,11 +855,11 @@ DoCopy(const CopyStmt *stmt, const char *queryString) cstate->escape = cstate->quote; } - /* Only single-character delimiter strings are supported. */ + /* Only single-byte delimiter strings are supported. */ if (strlen(cstate->delim) != 1) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("COPY delimiter must be a single ASCII character"))); + errmsg("COPY delimiter must be a single one-byte character"))); /* Disallow end-of-line characters */ if (strchr(cstate->delim, '\r') != NULL || @@ -906,7 +906,7 @@ DoCopy(const CopyStmt *stmt, const char *queryString) if (cstate->csv_mode && strlen(cstate->quote) != 1) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("COPY quote must be a single ASCII character"))); + errmsg("COPY quote must be a single one-byte character"))); if (cstate->csv_mode && cstate->delim[0] == cstate->quote[0]) ereport(ERROR, @@ -922,7 +922,7 @@ DoCopy(const CopyStmt *stmt, const char *queryString) if (cstate->csv_mode && strlen(cstate->escape) != 1) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("COPY escape must be a single ASCII character"))); + errmsg("COPY escape must be a single one-byte character"))); /* Check force_quote */ if (!cstate->csv_mode && force_quote != NIL)