Re: Undocumented feature costs a lot of performance in COPY

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Undocumented feature costs a lot of performance in COPY
Дата
Msg-id 200112042020.fB4KKqI28979@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Undocumented feature costs a lot of performance in COPY IN  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Yes, please fix it.  In fact, I think we should throw an error if more
> > than one character is specified as a delimiter.  Saying we ignore
> > multiple characters in the documentation is not enough when we silently
> > ignore them in the code.
> 
> Well, it'd be an easy enough addition:
> 
>     if (strlen(delim) != 1)
>         elog(ERROR, "COPY delimiter must be a single character");
> 
> This isn't multibyte-aware, but then neither is the implementation;
> delimiters that are multibyte characters won't work at the moment.

My point was that the documentation was saying it could only be one
character, and that we would ignore any characters after the first one,
but there was no enforcement in the code.

The right way to do it is to just say in the documentation it has to be
one character, and throw an error in the code if it isn't.

Limitations should be enforced in the code, if possible, not just
mentioned in the documenation, which may or may not get read.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bill Studenmund
Дата:
Сообщение: Re: Undocumented feature costs a lot of performance in
Следующее
От: Tom Lane
Дата:
Сообщение: Re: FW: [CYGWIN] 7.2b3 postmaster doesn't start on Win98