From c2284489106f6d2d0a9a2d2b84fe0baadab97ed4 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 18 Apr 2007 02:28:22 +0000 Subject: [PATCH] Update docs/error message for CSV quote/escape --- must be ASCII. Backpatch doc change to 8.2.X. --- doc/src/sgml/ref/copy.sgml | 6 +++--- src/backend/commands/copy.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 0140ea28ae..703951de80 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -1,5 +1,5 @@ @@ -225,7 +225,7 @@ COPY { tablename [ ( quote - Specifies the quotation character in CSV mode. + Specifies the ASCII quotation character in CSV mode. The default is double-quote. @@ -235,7 +235,7 @@ COPY { tablename [ ( escape - Specifies the character that should appear before a + Specifies the ASCII character that should appear before a QUOTE data character value in CSV mode. The default is the QUOTE value (usually double-quote). diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 193a50251f..be33bb76c4 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.281 2007/04/18 00:38:57 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.282 2007/04/18 02:28:22 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -893,7 +893,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 character"))); + errmsg("COPY quote must be a single ASCII character"))); /* Check escape */ if (!cstate->csv_mode && cstate->escape != NULL) @@ -904,7 +904,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 character"))); + errmsg("COPY escape must be a single ASCII character"))); /* Check force_quote */ if (!cstate->csv_mode && force_quote != NIL) -- 2.40.0