Commit b793e834 authored by Tom Lane's avatar Tom Lane

Adjust phrasing of complaints about multi-byte COPY delimiter strings.

Per pgsql-hackers discussion of 2009-02-17.
parent f38fbf31
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment