Re: Two small questions re/ COPY CSV data into table - Mailing list pgsql-general

From Matthias Apitz
Subject Re: Two small questions re/ COPY CSV data into table
Date
Msg-id 20190605120742.GA10506@sh4-5.1blu.de
Whole thread Raw
In response to Re: Two small questions re/ COPY CSV data into table  (Matthias Apitz <guru@unixarea.de>)
List 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 by date:

Previous
From: Prakash Ramakrishnan
Date:
Subject: Re: pg_repack issue
Next
From: Sathish Kumar
Date:
Subject: Re: pg_repack issue