Re: [COMMITTERS] pgsql: Update error message for COPY with a multi-byte delimiter.
Re: [COMMITTERS] pgsql: Update error message for COPY with a multi-byte delimiter.
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
momjian@postgresql.org (Bruce Momjian) writes: > Update error message for COPY with a multi-byte delimiter. You forgot the CSV strings. regards, tom lane
Re: [COMMITTERS] pgsql: Update error message for COPY with a multi-byte delimiter.
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Tom Lane wrote:
> momjian@postgresql.org (Bruce Momjian) writes:
> > Update error message for COPY with a multi-byte delimiter.
>
> You forgot the CSV strings.
OK, I wasn't clear on those but I am now. I backpatched the doc change
to 8.2.X.
--
Bruce Momjian http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/ref/copy.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v
retrieving revision 1.79
diff -c -c -r1.79 copy.sgml
*** doc/src/sgml/ref/copy.sgml 18 Apr 2007 00:17:56 -0000 1.79
--- doc/src/sgml/ref/copy.sgml 18 Apr 2007 02:26:36 -0000
***************
*** 225,231 ****
quote
! Specifies the quotation character in CSV</> mode.
The default is double-quote.
--- 225,231 ----
quote
! Specifies the ASCII quotation character in CSV</> mode.
The default is double-quote.
***************
*** 235,241 ****
escape
! Specifies the character that should appear before a
QUOTE</> data character value in CSV</> mode.
The default is the QUOTE</> value (usually double-quote).
--- 235,241 ----
escape
! 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).
Index: src/backend/commands/copy.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/commands/copy.c,v
retrieving revision 1.281
diff -c -c -r1.281 copy.c
*** src/backend/commands/copy.c 18 Apr 2007 00:38:57 -0000 1.281
--- src/backend/commands/copy.c 18 Apr 2007 02:26:37 -0000
***************
*** 893,899 ****
if (cstate->csv_mode && strlen(cstate->quote) != 1)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
! errmsg("COPY quote must be a single character")));
/* Check escape */
if (!cstate->csv_mode && cstate->escape != NULL)
--- 893,899 ----
if (cstate->csv_mode && strlen(cstate->quote) != 1)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
! errmsg("COPY quote must be a single ASCII character")));
/* Check escape */
if (!cstate->csv_mode && cstate->escape != NULL)
***************
*** 904,910 ****
if (cstate->csv_mode && strlen(cstate->escape) != 1)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
! errmsg("COPY escape must be a single character")));
/* Check force_quote */
if (!cstate->csv_mode && force_quote != NIL)
--- 904,910 ----
if (cstate->csv_mode && strlen(cstate->escape) != 1)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
! errmsg("COPY escape must be a single ASCII character")));
/* Check force_quote */
if (!cstate->csv_mode && force_quote != NIL)