pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthias Apitz <guru@unixarea.de>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Postgres general <pgsql-general@postgresql.org>
Subject: Re: Two small questions re/ COPY CSV data into table
Date: Wed, 5 Jun 2019 14:07:42 +0200
Message-ID: <20190605120742.GA10506@sh4-5.1blu.de> (raw)
In-Reply-To: <20190604172054.GA4376@sh4-5.1blu.de>
References: <20190604100247.GA2800@c720-r342378>
	<877ea1aby6.fsf@news-spur.riddles.org.uk>
	<20190604150318.GA13915@sh4-5.1blu.de>
	<87sgsp8ikd.fsf@news-spur.riddles.org.uk>
	<20190604162650.GA15928@sh4-5.1blu.de>
	<87blzd8fdq.fsf@news-spur.riddles.org.uk>
	<20190604172054.GA4376@sh4-5.1blu.de>

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!





view thread (10+ messages)

Message-ID: <20190605120742.GA10506@sh4-5.1blu.de>
Permalink:  ../20190605120742.GA10506@sh4-5.1blu.de/
Also on:    postgresql.org/message-id/20190605120742.GA10506@sh4-5.1blu.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: guru@unixarea.de, andrew@tao11.riddles.org.uk
  Subject: Re: Two small questions re/ COPY CSV data into table
  In-Reply-To: <20190605120742.GA10506@sh4-5.1blu.de>
  References: <20190604100247.GA2800@c720-r342378> <877ea1aby6.fsf@news-spur.riddles.org.uk> <20190604150318.GA13915@sh4-5.1blu.de> <87sgsp8ikd.fsf@news-spur.riddles.org.uk> <20190604162650.GA15928@sh4-5.1blu.de> <87blzd8fdq.fsf@news-spur.riddles.org.uk> <20190604172054.GA4376@sh4-5.1blu.de> <20190605120742.GA10506@sh4-5.1blu.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox