Re: Two small questions re/ COPY CSV data into table

Поиск
Список
Период
Сортировка
От Matthias Apitz
Тема Re: Two small questions re/ COPY CSV data into table
Дата
Msg-id 20190605120742.GA10506@sh4-5.1blu.de
обсуждение исходный текст
Ответ на Re: Two small questions re/ COPY CSV data into table  (Matthias Apitz <guru@unixarea.de>)
Список pgsql-general
El día Tuesday, June 04, 2019 a las 07:20:54PM +0200, Matthias Apitz escribió:

> El día Tuesday, June 04, 2019 a las 05:56:49PM +0100, Andrew Gierth escribió:
> 
> > If you use COPY ... WITH DELIMITER '|' (i.e. text mode, not CSV mode)
> > then the \| is accepted as being a literal | and the unescaped | is
> > treated as a delimiter. What is the point of the substitutions?
> 
> ...

> I will provide tomorrow the exact input line, the exact COPY command and
> the error.

It works exactly as Andrew states. My error was not caused by treating
the '|' of '\|' as DELIMITER, but by not having WITH (NULL '' ...) in the COPY cmd.
I misinterpreted the error message as not matching number of columns.
Sorry for the noise.

Thanks

    matthias
-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
May, 9: Спаси́бо освободители! Thank you very much, Russian liberators!



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

Предыдущее
От: Prakash Ramakrishnan
Дата:
Сообщение: Re: pg_repack issue
Следующее
От: Sathish Kumar
Дата:
Сообщение: Re: pg_repack issue