From: Tom Lane <tgl@sss.pgh.pa.us>
To: PASCAL CROZET <pascal.crozet@qualis-consulting.com>
Cc: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: plpgsql copy import csv double quotes
Date: Wed, 09 Oct 2019 18:31:17 -0400
Message-ID: <17097.1570660277@sss.pgh.pa.us> (raw)
In-Reply-To: <453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com>
References: <453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com>
PASCAL CROZET <pascal.crozet@qualis-consulting.com> writes:
> Ive experience issues with double quotes \34 inside fields, in a csv file.
> Ex :
> "value1","some text","other text with "double quotes" inside","last field"
I don't know of any definition of CSV format by which that's legal data.
The typical rule is that double quotes that are data must be doubled;
at least, that's what COPY expects by default. You can also get COPY
to handle variants like backslash-quote.
regards, tom lane
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: tgl@sss.pgh.pa.us, pascal.crozet@qualis-consulting.com
Subject: Re: plpgsql copy import csv double quotes
In-Reply-To: <17097.1570660277@sss.pgh.pa.us>
References: <453a8fd209f4444aacf7214b96c6eaa9@qualis-consulting.com> <17097.1570660277@sss.pgh.pa.us>
* 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